iverase commented on PR #12528: URL: https://github.com/apache/lucene/pull/12528#issuecomment-1733441807
My recommendation is to use the following method as you are just trying to flag if the visit method needs to keep processing points. ``` /** Similar to {@link IntersectVisitor#visit(int, byte[])} but data is visited in * increasing order on the {@sortedDim}, and in the case of ties, in increasing docID order. * Implementers 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; } ``` I would remove the "inverse" case as the inverse visitors are implementation details and IMHO should not be part of the API. > just implemented visitWithState in PointRangeQuery, and there is some speed up We should run the performance test in the [lucene benchmarks](lucene benchmarks) to check if there are slowdowns due to the extra check for each visited point. -- 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