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_r354425570
 
 

 ##########
 File path: 
lucene/core/src/java/org/apache/lucene/search/similarities/BM25Similarity.java
 ##########
 @@ -221,17 +221,22 @@ 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));
+      // In order to guarantee monotonicity with both freq and norm, we rewrite
 
 Review comment:
   It is worth mentioning also "without promotion to double".

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to