gf2121 commented on code in PR #14312: URL: https://github.com/apache/lucene/pull/14312#discussion_r1976945729
########## lucene/core/src/java/org/apache/lucene/search/DenseConjunctionBulkScorer.java: ########## @@ -128,6 +128,16 @@ private void scoreWindowUsingBitSet( assert windowMatches.scanIsEmpty(); assert clauseWindowMatches.scanIsEmpty(); + windowIterators.clear(); + for (DocIdSetIterator iterator : iterators) { + // Skip iterators that fully match the window + if (iterator.docID() > windowBase || iterator.peekNextNonMatchingDocID() < windowMax) { + windowIterators.add(iterator); + } + } + // Note: iterators may be empty! + iterators = windowIterators; Review Comment: lead clause might get changed in this window, `iterators.get(0)` need to advance `windowBase` again. I believe that is why CI tests get failed. ########## lucene/core/src/java/org/apache/lucene/search/DenseConjunctionBulkScorer.java: ########## @@ -128,6 +128,16 @@ private void scoreWindowUsingBitSet( assert windowMatches.scanIsEmpty(); assert clauseWindowMatches.scanIsEmpty(); + windowIterators.clear(); + for (DocIdSetIterator iterator : iterators) { + // Skip iterators that fully match the window + if (iterator.docID() > windowBase || iterator.peekNextNonMatchingDocID() < windowMax) { Review Comment: Would it be worth passing the comparison value in like `iterator.peekNextNonMatchingDocID(windowMax)` so that Implementations may reduce the number the blocks it need to check according to the threshold? -- 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