I've spent all day and night battling with Search API (with and without Apache Solr) in Drupal 8.

Does anyone know if you can use Search API to index paragraph content and then in a search views result, get back the "excerpt" of highlighted text from within a paragraph + the title of the node the paragraph is used in?

  • 1
    What exactly do you have working and what doesn't? The paragraph demo module contains an example search index that indexes paragraphs and works. It is a bit tedious to set up, when you want to use field based indexing, you need to add every possible path of paragraphs and fields. Or you can index the rendered entity, then it should work fine but might be slower to index – Berdir Dec 1 '16 at 20:51
  • I think he means he wants to be able to index paragraph fields so that excerpts based on them are possible. I have had similar questions in regards to searching across paragraphs, as well as adding them for scoring/boosting in Solr. – Kevin Jan 26 '17 at 19:26
  • @Kevin – You have a link to that question? – leymannx Nov 13 '19 at 8:03

If you add the specific fields within your paragraphs to search_api fields it will generate excerpts for them. If you just have 'Rendered HTML' of the entire page, it will not create excerpts of paragraph text.

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.