jpountz commented on code in PR #14312: URL: https://github.com/apache/lucene/pull/14312#discussion_r1986310517
########## 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: I'm a bit on the fence about it because it makes testing harder (I like it being declarative, like we do for e.g. impacts or positions), and I don't expect this `peekNextNonMatchingDocID` call to ever be a bottleneck? -- 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