original-brownbear commented on code in PR #14391: URL: https://github.com/apache/lucene/pull/14391#discussion_r2010353392
########## lucene/core/src/java/org/apache/lucene/index/PointValues.java: ########## @@ -351,35 +351,32 @@ public final void intersect(IntersectVisitor visitor) throws IOException { assert pointTree.moveToParent() == false; } - private void intersect(IntersectVisitor visitor, PointTree pointTree) throws IOException { - Relation r = visitor.compare(pointTree.getMinPackedValue(), pointTree.getMaxPackedValue()); - switch (r) { - case CELL_OUTSIDE_QUERY: - // This cell is fully outside the query shape: stop recursing - break; - case CELL_INSIDE_QUERY: + private static void intersect(IntersectVisitor visitor, PointTree pointTree) throws IOException { + int depth = 0; Review Comment: Sorry forgot to respond here, yea this is much better. I think it costs a tiny amount of extra cycles but we shouldn't be dealing with that cost via an extra variable :) I'll think I have a cool follow-up based on this incoming :) Thanks! -- 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