iverase commented on a change in pull request #7: URL: https://github.com/apache/lucene/pull/7#discussion_r745891282
########## File path: lucene/core/src/java/org/apache/lucene/index/PointValues.java ########## @@ -227,8 +228,59 @@ protected PointValues() {} CELL_CROSSES_QUERY }; + /** Create a new {@link PointTree} to navigate the index */ + public abstract PointTree getPointTree() throws IOException; + /** - * We recurse the BKD tree, using a provided instance of this to guide the recursion. + * Basic operations to read the KD-tree. + * + * @lucene.experimental + */ + public interface PointTree extends Cloneable { + + /** + * Clone, the current node becomes the root of the new tree. The method should not be called + * after a successful call to {@link #moveToParent()} Review comment: The reason you cannot do it (and this constraint is the same in the current version) is that you copy the current state of the tree, and in that state we don't allow to moveToChild(). You need to be able to reset the tree to the situation when you first arrived to the node... it is probably doable but sure there will be a performance hit. -- 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