2

I am using Search API for Solr and I see that it generates excerpts fine but it only works with Search API page when theme as search results is selected only.

I would like to get highlighting to work in my view.

I've created a view with exposed filter: Fulltext search

I've enabled highlighting option on the solr server level under advanced setting on the server (admin/config/search/search_api/server/xxxxx/edit), so I have enabled the following 3 options:

  1. Return an excerpt for all results
  2. Retrieve result data from Solr
  3. Highlight retrieved data

I also enabled highlighting in the filter tab of the Search api index (admin/config/search/search_api/index/default_node_index/workflow)

When I add "Search Excerpt" as a field in my View, I don't get highlighting in the actual field, in my case it's the body field of the node, but I can see highlighting in the excerpt field itself as you can see in the screen shot below.

Highlighting works just fine for the title field though, but not for the body or any other custom field type.

As you can see, it seems highlighting is working, but for some reason it doesn't show up in the body field. What am I doing wrong here?

I hope somebody there can help me as I have been struggling with this issue for a very long time.

Thanks!

enter image description here

  • Have you resolved this? I think this is the intended behaviour, i.e. to only see highlighted terms in the search excerpt – Yannis P. Jan 27 '16 at 10:04
  • relevant: drupal.org/node/2719573 – tenken Nov 15 '16 at 22:29

Your Answer

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

Browse other questions tagged or ask your own question.