lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: BM25 Similarity implementation
Date Thu, 16 Feb 2006 18:04:02 GMT
Trieschnigg, R.B. (Dolf) wrote:
> I would like to implement the Okapi BM25 weighting function using my own Similarity implementation.
Unfortunately BM25 requires the document length in the score calculation, which is not provided
by the Scorer.

How do you want to measure document length?  If the number of tokens is 
an acceptable measure, then the norm contains sqrt(numTokens) by 
default.  You can modify your Similarity.lengthNorm() implementation to 
not perform the sqrt, or square the norm.


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

View raw message