Apache Lucene open-source search software
Disable exchanging minimum scores across slices for exhaustive evaluation. (#13954)
Adrien Grand5c080156f57b
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 9da41e6e4cb..f3e359b7630 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -65,8 +65,12 @@ Optimizations* GITHUB#13941: Optimized computation of top-hits on disjunctive queries withmany clauses. (Adrien Grand)+* GITHUB#13954: Disabled exchanging scores across slices for exhaustive+ top-hits evaluation. (Adrien Grand)+* GITHUB#13899: Check ahead if we can get the count. (Lu Xugang)+Bug Fixes---------------------* GITHUB#13832: Fixed an issue where the DefaultPassageFormatter.format method did not format passages as intendeddiff --git a/lucene/core/src/java/org/apache/lucene/search/TopFieldCollectorManager.java b/lucene/core/src/java/org/apache/lucene/search/TopFieldCollectorManager.javaindex d09a589be97..2d4a0c0e215 100644--- a/lucene/core/src/java/org/apache/lucene/search/TopFieldCollectorManager.java+++ b/lucene/core/src/java/org/apache/lucene/search/TopFieldCollectorManager.java@@ -93,7 +93,10 @@ public class TopFieldCollectorManager implements CollectorManager<TopFieldCollecsupportsConcurrency? HitsThresholdChecker.createShared(Math.max(totalHitsThreshold, numHits)): HitsThresholdChecker.create(Math.max(totalHitsThreshold, numHits));- this.minScoreAcc = supportsConcurrency ? new MaxScoreAccumulator() : null;+ this.minScoreAcc =+ supportsConcurrency && totalHitsThreshold != Integer.MAX_VALUE+ ? new MaxScoreAccumulator()+ : null;this.collectors = new ArrayList<>();}diff --git a/lucene/core/src/java/org/apache/lucene/search/TopScoreDocCollectorManager.java b/lucene/core/src/java/org/apache/lucene/search/TopScoreDocCollectorManager.javaindex 4e3181abdf7..94a4e1a82d3 100644--- a/lucene/core/src/java/org/apache/lucene/search/TopScoreDocCollectorManager.java+++ b/lucene/core/src/java/org/apache/lucene/search/TopScoreDocCollectorManager.java@@ -75,7 +75,10 @@ public class TopScoreDocCollectorManagersupportsConcurrency? HitsThresholdChecker.createShared(Math.max(totalHitsThreshold, numHits)): HitsThresholdChecker.create(Math.max(totalHitsThreshold, numHits));- this.minScoreAcc = supportsConcurrency ? new MaxScoreAccumulator() : null;+ this.minScoreAcc =+ supportsConcurrency && totalHitsThreshold != Integer.MAX_VALUE+ ? new MaxScoreAccumulator()+ : null;}/**