bruno-roustant commented on a change in pull request #1043: LUCENE-9071: Speed
up BM25 scores.
URL: https://github.com/apache/lucene-solr/pull/1043#discussion_r352307646
##########
File path:
lucene/core/src/java/org/apache/lucene/search/similarities/BM25Similarity.java
##########
@@ -221,8 +251,8 @@ public final SimScorer scorer(float boost,
CollectionStatistics collectionStats,
@Override
public float score(float freq, long encodedNorm) {
- double norm = cache[((byte) encodedNorm) & 0xFF];
- return weight * (float) (freq / (freq + norm));
+ float norm = cache[((byte) encodedNorm) & 0xFF];
+ return weight * tf(freq, norm);
Review comment:
Thanks, very good point.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]