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


##########
lucene/core/src/java/org/apache/lucene/index/PointValues.java:
##########
@@ -317,6 +329,18 @@ default void visit(DocIdSetIterator iterator, byte[] 
packedValue) throws IOExcep
       }
     }
 
+    /**
+     * Similar to {@link IntersectVisitor#visit(DocIdSetIterator, byte[])} but 
return a match state.
+     */
+    default int visitWithState(DocIdSetIterator iterator, byte[] packedValue, 
int sortedDim)

Review Comment:
   I am wondering if we need to return different values. At the end of the day 
we only need to know if we should visit more points on the leaf. Have you tried 
something more simple like:
   
   ```
       /** Similar to {@link IntersectVisitor#visit(int, byte[])} but ensure 
that data is visited in
        * increasing order on the {@sortedDim}, and in the case of ties, in 
increasing docID order.
        * Implementors can stop processing points on the leaf by returning 
=false, when for example the 
        * sorted dimension value is too high to be matched by the query.
        * 
        * @return true if the visitor should continue visiting points on this 
leaf, otherwise false.
        * */
       default boolean visitWithSortedDim(int docID, byte[] packedValue, int 
sortedDim) throws IOException {
         visit(docID, packedValue);
         return true;
       }
   ```



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