gf2121 commented on code in PR #14529:
URL: https://github.com/apache/lucene/pull/14529#discussion_r2057680596


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene90/IndexedDISI.java:
##########
@@ -625,6 +634,29 @@ boolean advanceExactWithinBlock(IndexedDISI disi, int 
target) throws IOException
         disi.exists = false;
         return false;
       }
+
+      @Override
+      boolean intoBitsetWithinBlock(IndexedDISI disi, int upTo, FixedBitSet 
bitSet, int offset)
+          throws IOException {
+        if (disi.doc >= upTo) {
+          return true;
+        }
+        bitSet.set(disi.doc - offset);
+
+        for (int i = disi.index + 1, to = disi.nextBlockIndex; i <= to; i++) {

Review Comment:
   In `advanceWithinBlock`, `disi.index++` is executed in the loop body before 
`if (doc >= targetInBlock)` so it is not actually excluded. 
`advanceWithinBlock` can return true when `disi.index` equals 
`disi.disi.nextBlockIndex`



-- 
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

Reply via email to