lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: Modifying scores
Date Tue, 23 Jul 2002 18:14:30 GMT
Mike Tinnes wrote:
> I'm trying to implement a HITS/PageRank type algorithm and need to modify
> the document scores after a search is performed. The final score will be a
> combination of the lucene score and PageRank. Is there currently a way to
> modify the scores on the fly via HitCollector? so that calling the
> Hits.score() function will return my combined score?

There's currently no API that supports this well.  The best approach at 
present would be to define a HitCollector which multiplies your PageRank 
factor into the score and collects the top-scoring hits.  (The Hits 
class does not use the HitCollector API, so you can't use it when you're 
using a HitCollector.)

Longer term, we plan to add a Document.setBoost(float) method.  The 
number supplied here will be multiplied into scores for hits on the 
document.  There will also be a Field.setBoost(float).  Both boosts will 
default to 1.0.  I'm hoping to start implementing this soon.  If you're 
interested in helping with the implementation, or have more ideas about 
this, please send a message to the lucene-dev list.

Cheers,

Doug



--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message