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


##########
lucene/core/src/java/org/apache/lucene/index/DocValuesSkipper.java:
##########
@@ -98,4 +98,29 @@ public abstract class DocValuesSkipper {
 
   /** Return the global number of documents with a value for the field. */
   public abstract int docCount();
+
+  /**
+   * Advance this skipper so that all levels intersects the range given by 
{@code minValue} and
+   * {@code maxValue}. If there are no intersecting levels, the skipper is 
exhausted.
+   *
+   * <p><b>NOTE</b>: The behavior is undefined if this method is called and 
{@link #advance(int)}
+   * has not been called yet.
+   */
+  public final void advance(long minValue, long maxValue) throws IOException {
+    while (true) {
+      if (minDocID(0) == DocIdSetIterator.NO_MORE_DOCS
+          || (minValue(0) <= maxValue && maxValue(0) >= minValue)) {
+        break;
+      } else {
+        int maxDocID = maxDocID(0);

Review Comment:
   I added some comments which hopefully makes it more clear.



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