iverase commented on a change in pull request #486: URL: https://github.com/apache/lucene/pull/486#discussion_r761251202
########## File path: lucene/core/src/java/org/apache/lucene/index/PointValues.java ########## @@ -269,22 +270,33 @@ protected PointValues() {} long size(); /** Visit all the docs below the current node. */ - void visitDocIDs(IntersectVisitor visitor) throws IOException; + void visitDocIDs(DocIdsVisitor docIdsVisitor) throws IOException; /** Visit all the docs and values below the current node. */ - void visitDocValues(IntersectVisitor visitor) throws IOException; + default void visitDocValues(DocValuesVisitor docValuesVisitor) throws IOException { + visitDocValues((min, max) -> Relation.CELL_CROSSES_QUERY, docID -> {}, docValuesVisitor); + } + + /** + * Similar to {@link #visitDocValues(DocValuesVisitor)} but in this case it allows adding a + * filter that works like {@link IntersectVisitor#compare(byte[], byte[])}. + */ + void visitDocValues( + BiFunction<byte[], byte[], Relation> compare, Review comment: I like it as I was considering the same so +1, I will add it -- 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