shubhamvishu commented on code in PR #12682:
URL: https://github.com/apache/lucene/pull/12682#discussion_r1361737240


##########
lucene/core/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java:
##########
@@ -504,9 +504,9 @@ public TFIDFScorer(float boost, Explanation idf, float[] 
normTable) {
 
     @Override
     public float score(float freq, long norm) {
-      final float raw = tf(freq) * queryWeight; // compute tf(f)*weight
+      final double raw = tf(freq) * queryWeight; // compute tf(f)*weight
       float normValue = normTable[(int) (norm & 0xFF)];
-      return raw * normValue; // normalize for field
+      return (float) (raw * normValue); // normalize for field

Review Comment:
   I see. Thanks for clarifying! I'll revert changes to this file too.



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to