lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Highlighting phrases in 2.9
Date Wed, 30 Sep 2009 21:39:50 GMT
Scott Smith wrote:
> I've been looking at the changes I have to make in my code to go from
> 2.4.1 to 2.9.  One of the features I have is to highlight query hits in
> documents which meet the search criteria.   If the query has a phrase,
> then I need to highlight the phrase, but not isolated words from the
> phrase which also happen to be in the document.
>
>  
>
> In 2.4.1, I do this using the SimpleHTMLFormatter, the NullFragmenter
> and the SpanScorer.  It looks like highlighter had a major overhaul in
> 2.9 and that SpanScorer is now the wrong scorer to use (it's been moved
> out of the highlighter).   I also found some JIRA's that seem to imply
> that SpanScorer is now used by default, but I don't see anything in the
> javadocs that say this is the case. 
>
>  
>
> Do I just need to remove the SpanScorer completely and assume that the
> highlighter takes care of that for me?  
>
>  
>
> Can someone suggest what I need to do or point me to some documentation?
>
>
>
>   
The QueryScorer is now what the SpanScorer was - if you want what was
the QueryScorer before, use the TermQueryScorer.
If you want what was the SpanScorer, use the QueryScorer.

-- 
- Mark

http://www.lucidimagination.com




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


Mime
View raw message