You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Daniel Debray <da...@toroleo.de> on 2014/03/05 18:57:25 UTC

Improvement for solr highlighter

Hello,

i was digging into the highlighting functionality in solr and saw that 
if multiple highlighting fields (like wildcards) are specified, the 
IndexReader is used at every document and field to get the term vectors 
(at TokenSources.getTokenStreamWithOffsets). I would suggest that a 
optional cache would be good here that holds the document id as a key 
and a Fields object as value. I implemented this behavior in the 
DefaultSolrHighlighter.doHighlightingByHighlighter method and got nice 
performance improvement there.

What do you think, does this make sense or is this a more rare usecase?

Greetings,
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org