lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] [Created] (LUCENE-4565) Simplify TaxoReader ParentArray/ChildrenArrays
Date Mon, 19 Nov 2012 14:44:59 GMT
Shai Erera created LUCENE-4565:

             Summary: Simplify TaxoReader ParentArray/ChildrenArrays
                 Key: LUCENE-4565
             Project: Lucene - Core
          Issue Type: Improvement
          Components: modules/facet
            Reporter: Shai Erera
            Assignee: Shai Erera
            Priority: Minor

TaxoReader exposes two structures which provide information about a categories parent/childs/siblings:
ParentArray and ChildrenArrays. ChildrenArrays are derived (i.e. created) from ParentArray.

I propose to consolidate all that into one API ParentInfo, or CategoryTreeInfo (a better name?)
which will provide the same information, only from one object. So instead of making these

int[] parents = taxoReader.getParentArray();
int[] youngestChilds = taxoReader.getChildrenArrays().getYoungestChildArray();
int[] olderSiblings = taxoReader.getChildrenArrays().getOlderSiblingArray();

one would make these calls:

int[] parents = taxoReader.getParentInfo().parents();
int[] youngestChilds = taxoReader.getParentInfo().youngestChilds();
int[] olderSiblings = taxoReader.getParentInfo().olderSiblings();

Not a big change, just consolidate more code into one logical place. All of these arrays will
continue to be lazily allocated.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message