kkewwei commented on code in PR #16510:
URL: https://github.com/apache/lucene/pull/16510#discussion_r3895453409
##########
lucene/core/src/java/org/apache/lucene/util/NotDocIdSet.java:
##########
@@ -84,6 +84,27 @@ public int docIDRunEnd() {
return Math.min(nextSkippedDoc, maxDoc);
}
+ @Override
+ public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws
IOException {
+ assert offset <= doc;
+ int boundedUpTo = Math.min(upTo, maxDoc);
+ while (doc < boundedUpTo) {
+ if (doc < nextSkippedDoc) {
+ // [doc, nextSkippedDoc) is a run of matches.
+ int runEnd = Math.min(nextSkippedDoc, boundedUpTo);
+ bitSet.set(doc - offset, runEnd - offset);
+ doc = runEnd;
+ }
+ while (doc == nextSkippedDoc) {
Review Comment:
Thanks for the review. Your comment is absolutely correct, I've addressed it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]