You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gu...@apache.org on 2025/08/04 08:03:27 UTC
(lucene) branch main updated: Only score doc first when minCompetitiveScore is zero (#14856)
This is an automated email from the ASF dual-hosted git repository.
guofeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new 743eedec7b8 Only score doc first when minCompetitiveScore is zero (#14856)
743eedec7b8 is described below
commit 743eedec7b8010f16bdddac10bb8c0c4dd2cb231
Author: Guo Feng <52...@users.noreply.github.com>
AuthorDate: Mon Aug 4 16:03:22 2025 +0800
Only score doc first when minCompetitiveScore is zero (#14856)
---
.../java/org/apache/lucene/search/BlockMaxConjunctionBulkScorer.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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 d10c0bb41e7..1a6ac5985c6 100644
--- a/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionBulkScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionBulkScorer.java
@@ -84,7 +84,10 @@ final class BlockMaxConjunctionBulkScorer extends BulkScorer {
public int score(LeafCollector collector, Bits acceptDocs, int min, int max) throws IOException {
collector.setScorer(scorable);
- int windowMin = scoreDocFirstUntilDynamicPruning(collector, acceptDocs, min, max);
+ int windowMin = Math.max(lead.docID(), min);
+ if (scorable.minCompetitiveScore == 0) {
+ windowMin = scoreDocFirstUntilDynamicPruning(collector, acceptDocs, min, max);
+ }
while (windowMin < max) {
// Use impacts of the least costly scorer to compute windows