Topic on Help talk:CirrusSearch

search results not highlighted

4
Errezeta89 (talkcontribs)

when i search with wildcard the search results inside the pages are not highlighted. only the title words are highlighted. is there some option to be activated for this?

DCausse (WMF) (talkcontribs)

It depends on the highlighter you use. On WMF installations we use https://github.com/wikimedia/search-highlighter which tries to highlight all the words it can.

The default highlighter provided by elasticsearch will do it on a best effort basis. Basically if the wildcard expression expands to more than 1024 terms then it's likely that some words won't be highlighted. This is due to the nature of an inverted index. The fact that you see highlights in the title is most probably due to the fact that the dictionary of words in your titles is less diverse than the one on the body.

In short I suggest to install https://github.com/wikimedia/search-highlighter and enable the following options:

$wgCirrusSearchUseExperimentalHighlighter = true;
$wgCirrusSearchOptimizeIndexForExperimentalHighlighter = true;
This post was hidden by 151.0.189.140 (history)
Errezeta89 (talkcontribs)

it works! thank you

Reply to "search results not highlighted"