lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markharw00d <>
Subject New Highlighter features
Date Sun, 02 Jan 2005 22:43:51 GMT
The Highlighter package in CVS has been updated with the following new 

* GradientFormatter is a new formatter that can be used to change the 
colour intensity of matching terms, based on their score. I have found 
this to be a useful way of visualizing the basis of query matches, 
especially when  the query was derived automatically eg in a 
"MoreLikeThis" style of query.

* The QueryScorer class has a new constructor that takes an IndexReader 
which is used to provide term scores based on scarcity (idf score).  
Using this with the new GradientFormatter ensures the most important 
terms are highlighted most strongly.

* New class "TokenSources" offers methods to produce a TokenStream from 
indexes using the new TermVector features (saving the cost of 
reanalyzing to produce TokenStreams for the highlighter).

TokenStreams. Formatters and Scorers are all pluggable elements of the 
main Highlighter class so these are just new extensions around the 
existing core functionality. See the Javadocs for further details on how 
to use these components..


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message