Hi,

I want to modify the display of the search results (created via search_api_solr) with the "Highlighting" processor enabled. However, the highlighting only shows when using the built-in "Themed as search results" view mode. Do I have to modify the respective template file (search-api-page-result.tpl.php)? Or have I missed something when configuring my custom view mode?

Any pointers welcome.

Kind regards,
Frank

Comments

drunken monkey’s picture

Category: Feature request » Support request
Status: Active » Fixed
Issue tags: -view modes

It's not really possible to highlight the results when using another view mode, sorry!
This is because using a "normal" view mode will necessitate loading the entity, and the entity loaded from the database of course doesn't have any of its fields highlighted.
For implementing this, you'll probably have to implement a template preprocessing hook and there highlight the results data yourself (or highlight the entities' fields directly and then call entity_view() on them again).

PS: It seems you (like many others – it's really easy to misinterpret) are confused by the "Issue tags" field. As the guidelines state, they aren't meant for free text tags related to the issue, but only for specific categorization purposes, usually by module maintainers.
So, if you aren't sure your current usage is correct, please just leave the field empty.

Frank Ralf’s picture

Thanks for this information.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.