lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: Implementing new scoring algorithms in lucene
Date Tue, 21 Feb 2006 07:59:52 GMT
On Tuesday 21 February 2006 05:34, Shailesh Kochhar wrote:
...
> 
> I have a question about the sumOfSquaredWeigths method. As I
> understand it, it computes the square of the idf for a given term that
> is used to normalize the weight of individual terms in the query.
> 
> In implementing a different scoring algorithm, the query normalization
> I use is different and the sumOfSquaredWeights method isn't needed.
> However, it is being called from a number of different places that
> makes it hard to remove. I could easily implement the calculation of
> the qery normalization factor here, but the name of the method would
> be very misleading.
>
> Is there something I'm missing about this method, or is it a good
> candidate for renaming to something broader? I feel that the entire

What's in a name? It is one of the methods called at normalisation time,
so there is nothing wrong with using it for your own normalisation.
In case you need another method signature, you'll need to
extend Weight, but even then a new method might well be called
from sumOfSquaredWeights.

> scoring framework has many components too tightly knit together that
> make swapping a new algorithm in quite difficult. Ideally one should
> only have to extend the Similarity, Query and Scorer classes.

It's possible to implement another way of scoring. To keep the efficiency
of Lucene, you might want to stick to the way TermScorer works.

Regards,
Paul Elschot
 
 

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


Mime
View raw message