You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Ignacio Vera (Jira)" <ji...@apache.org> on 2021/11/29 09:18:00 UTC

[jira] [Created] (LUCENE-10269) Add the ability to read KD trees from right to left

Ignacio Vera created LUCENE-10269:
-------------------------------------

             Summary: Add the ability to read KD trees from right to left
                 Key: LUCENE-10269
                 URL: https://issues.apache.org/jira/browse/LUCENE-10269
             Project: Lucene - Core
          Issue Type: Improvement
            Reporter: Ignacio Vera


In LUCENE-9820 we exposed a programatic API to navigate Lucene Kd-trees. It is currently only possible to navigate those trees from left to right via the methods #moveToChild and #moveToSibling.

 

In LUCENE-10262 we improve the Kd tree so we remove the constraint of having to read the tree always forward. This added the possibility to introduce an API to read the tree from right to left. This will allow for example to get the maximum value for a dimension stored in a kd-tree that contains deleted documents,

 

The idea will be something like:

 

 
{code:java}
/**
 * Move to the first child node and return {@code true} upon success. Returns {@code false} for
 * leaf nodes and {@code true} otherwise.
 */
boolean moveToFirstChild() throws IOException;

/**
 * Move to the next sibling node and return {@code true} upon success. Returns {@code false} if
 * the current node is the last child.
 */
boolean moveToNextSibling() throws IOException; 

/**
 * Move to the last child node and return {@code true} upon success. Returns {@code false} for
 * leaf nodes and {@code true} otherwise.
 */
boolean moveToLastChild() throws IOException;

/**
 * Move to the previous sibling node and return {@code true} upon success. Returns {@code false} if
 * the current node is the first child.
 */
boolean moveToPreviousSibling() throws IOException;

{code}
 

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org