I have installed search api module in drupal 8 and included excerpt in the search result.

But excerpt are always empty in the search result. (HTML div element is there but no content inside)

I searched in the forum and enabled the 'highlights' from settings as suggested. But no changes in the result (I cleared the cache)

Am i missing anything?


First go to this path admin/config/search/search-api/index/default_index/processors#edit-processors-highlight-settings make sure this settings are enabled

enter image description here

Next i created a view Global search which has search Excerpt field.

enter image description here

Finally i was able to see the highlighted text word after searching

enter image description here

Actually this is not default search form that comes in drupal8 it is exposed form in block if you see in view exposed form setting i have enabled it. once this is done, exposed form comes in block just place that in which ever regions you want.


These days this config variable is at: /admin/config/search/search-api/index/default_solr_index/processors where "default_solr_index" is the machine name of your index.

The checkbox you want is called "Highlight"


Go to /admin/config/search/search-api/index/INDEXNAME/processors and click "highlight". Do not forget to include the exerpt in your view fields.

Check "Highlight"

include the exerpt in your view fields.


Let me summarize the question anno 2021:

  1. Create a Solr server + Default Solr content index (/admin/config/search/search-api) solr server + index example

  2. Edit your server (/admin/config/search/search-api/server/your_default_solr_server/edit). Open the advanced tab and select:Retrieve result data from Solr, Retrieve highlighted snippets

solr highlighted snippeds drupal 8

  1. Edit your index and select the datasources (/admin/config/search/search-api/index/your_default_solr_index/edit)

  2. Add fields to search into. If you created a content type that exists of paragraphs or custom blocks. Be sure to add those fields in this section to get a result. (/admin/config/search/search-api/index/your_default_solr_index/fields)

solr and paragraphs

  1. Go to the processors section inside the search index (admin/config/search/search-api/index/your_default_solr_index/processors) Select 'highlight' and scroll down to the page to enable settings.

index processors solr highlight

Select your preferences: solr index processor highlight settings

  1. Create a view and add the "Search:Excerpt" into the fields section:

solr highlight excerpt in view

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.