Solr highlighting multiple terms

I configured Solr so that the terms I'm looking for are highlighted, but if these terms are far from them, I will only see the first selection fragment.

I want to have something similar to Google: splitting fragments using an "ellipse" (...), so I can immediately see several terms in their context.

Is it possible?

+6
highlighting solr
source share
2 answers

You are looking for the hl.snippets parameter. By default, it is 1 and determines how many (maximum) fragments of each selected field are returned in each document.

See http://wiki.apache.org/solr/HighlightingParameters#hl.snippets

+8
source share

I'm not sure if I am allowed to cross-post, but I hope that this question (which has not yet been answered) is very important for the above.

https://stackoverflow.com/questions/28326758/solr-highlighting-multiple-terms-what-is-the-separator

Many thanks.

0
source share

All Articles