diff --git a/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionBulkScorer.java b/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionBulkScorer.java index 31046cee5e8e..ee7fada19e97 100644 --- a/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionBulkScorer.java +++ b/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionBulkScorer.java @@ -67,7 +67,7 @@ private float computeMaxScore(int windowMin, int windowMax) throws IOException { scorers[i].advanceShallow(windowMin); } - float maxWindowScore = 0; + double maxWindowScore = 0; for (int i = 0; i < scorers.length; ++i) { float maxClauseScore = scorers[i].getMaxScore(windowMax); sumOfOtherClauses[i] = maxClauseScore; @@ -76,7 +76,7 @@ private float computeMaxScore(int windowMin, int windowMax) throws IOException { for (int i = sumOfOtherClauses.length - 2; i >= 0; --i) { sumOfOtherClauses[i] += sumOfOtherClauses[i + 1]; } - return maxWindowScore; + return (float) maxWindowScore; } @Override