0

I have a Rich text field. If the user enters a hyperlink in the richtextbox and I run a query in SOLR, it shows up as text only. The link associated does not show up. What could the issue be?

In the images below, you can see that the field has text Socialize that is a hyperlink, but it shows up as plain text in SOLR.

enter image description here

enter image description here

2

That's not really an issue. Attributes of html tags are ignored.

If you have a content of rich text like:

<div class="red-border" style="font-family: arial">Some text here</div>

You don't want the content of field in Solr to be

"div class red-border style font-family arial Some text here div"

Your content is

"Some text here"

Same with link

<a href="https://facebook.com">Socialize</a>

Name of the tag and attributes are ignored, that's why your content is not

"a href https://facebook.com Socialize a"

The content of your field is only

"Socialize"
2
  • Thank you. If I want to search for the keword facebook, in that case, it wouldn't find the keyword as no HTML is stored. What would be the best way to resolve this? Jun 16 at 16:43
  • 1
    I'm afraid the only solution would be to use "facebook" in the content, not in attributes of html Jun 17 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.