jpountz commented on code in PR #13343: URL: https://github.com/apache/lucene/pull/13343#discussion_r1592820524
########## lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionScorer.java: ########## @@ -115,6 +115,10 @@ private void moveToNextBlock(int target) throws IOException { } private int advanceTarget(int target) throws IOException { + if (minScore <= 0) { + return target; Review Comment: I'm a bit concerned that this fast path breaks the invariant that `doc < upTo`. I wonder if the following approach would also improve things for the case you're after: ```diff diff --git a/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionScorer.java b/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionScorer.java index 127d6346edd..47ef5e07f19 100644 --- a/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionScorer.java +++ b/lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionScorer.java @@ -110,8 +110,13 @@ final class BlockMaxConjunctionScorer extends Scorer { } private void moveToNextBlock(int target) throws IOException { - upTo = advanceShallow(target); - maxScore = getMaxScore(upTo); + if (minScore == 0) { + upTo = target; + maxScore = Float.POSITIVE_INFINITY; + } else { + upTo = advanceShallow(target); + maxScore = getMaxScore(upTo); + } } private int advanceTarget(int target) throws IOException { ``` -- 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