zacharymorn commented on code in PR #12194: URL: https://github.com/apache/lucene/pull/12194#discussion_r1130592912
########## lucene/core/src/java/org/apache/lucene/search/DocIdSetIterator.java: ########## @@ -211,4 +216,22 @@ protected final int slowAdvance(int target) throws IOException { * may be a rough heuristic, hardcoded value, or otherwise completely inaccurate. */ public abstract long cost(); + + /** + * Returns the next doc ID that may not be a match. Note that this API will essentially provide + * the following two guarantees: Review Comment: While on this topic, I'm wondering also if we should also adjust the behavior of `BitSet#nextSetBit`, as it would return `NO_MORE_DOCS` when there are no more set bit (as opposed to max doc): https://github.com/apache/lucene/blob/96efb34d00bbdac6bdac2fd6f038e1dad1e31195/lucene/core/src/java/org/apache/lucene/util/BitSet.java#L80-L83 In contrast, Java's `BitSet#nextSetBit` would return -1 in such a scenario. -- 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