Does Solr highlight without stop words for phrases?

I try to highlight the results in Solr and so far, it has been a struggle for customization here and there ... My main concern now is that I got highlighting of phrases that work, but if I look for something like "World Cup in Brazil: An Unexpected Challenge

Backlight box will return: Brazil World Cup: An Unexpected Challenge

I think it could be due to stop words (my field is of type "textgen", by the way). Is there any parameter to run in the request that will return the entire field highlighted as expected? Or do I need to remove the stop word filter in textgen?

+2
source share
1 answer

This is definitely due to stop words. Consider declaring a new type of field, for example textgen, but without it, index or query analyzers in it:

<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> 
+1
source

Source: https://habr.com/ru/post/1445275/


All Articles