iverase commented on code in PR #16077:
URL: https://github.com/apache/lucene/pull/16077#discussion_r3257520676


##########
lucene/core/src/java/org/apache/lucene/util/NotDocIdSet.java:
##########
@@ -77,6 +77,16 @@ public int advance(int target) throws IOException {
         }
       }
 
+      @Override
+      public int docIDRunEnd() throws IOException {
+        assert doc != NO_MORE_DOCS;
+        int skipped = nextSkippedDoc;
+        if (doc > skipped) {
+          skipped = inIterator.advance(doc);

Review Comment:
   The contract says:
   
   ```
   The current position of this iterator is not affected by calling {@link 
#docIDRunEnd()}
   ```
   
   And this is not affected, we are just looking ahead if needed by te position 
of the iterator is the same.



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

Reply via email to