lucene-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucene-solr] bruno-roustant commented on a change in pull request #1043: LUCENE-9071: Speed up BM25 scores.
Date Sat, 30 Nov 2019 22:26:38 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message