parkertimmins commented on code in PR #16450:
URL: https://github.com/apache/lucene/pull/16450#discussion_r3693282630


##########
lucene/core/src/java/org/apache/lucene/search/SkipBlockRangeIterator.java:
##########
@@ -113,28 +113,26 @@ public long cost() {
 
   /**
    * Returns the exclusive end of the current skip block (the actual block 
boundary from the
-   * skipper), regardless of match state. Unlike {@link #docIDRunEnd()} which 
returns {@code doc+1}
-   * for MAYBE blocks, this always returns the full block boundary so callers 
can bulk-evaluate the
-   * entire block at once.
+   * skipper), regardless of match state. {@link #docIDRunEnd()} returns the 
same boundary for MAYBE
+   * and YES_IF_PRESENT blocks, but may extend beyond it for YES blocks.
    */
   public int blockEnd() {
     return skipper.maxDocID(0) + 1;
   }
 
   @Override
   public int docIDRunEnd() throws IOException {
-    if (match != Match.YES) {

Review Comment:
   We can safely return runs to the end of MAYBE and YES_IF_PRESENT blocks, 
since this iterator is a set of all docIDs that are YES, YES_IF_PRESENT, and 
MAYBE.



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