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

1 Answer 1


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

  • 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? Commented Jun 16, 2021 at 16:43
  • 1
    I'm afraid the only solution would be to use "facebook" in the content, not in attributes of html
    – Marek Musielak
    Commented Jun 17, 2021 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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