[
https://issues.apache.org/jira/browse/LUCENE-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera resolved LUCENE-4565.
--------------------------------
Resolution: Fixed
Fix Version/s: 5.0
4.1
Lucene Fields: New,Patch Available (was: New)
I've decided to leave the API with the short names + javadocs. I thought about
removing any mentions about youngest/oldest because that's implementation
detail and might change one day. But I didn't.
What should really matter to one is how to use the information in these 3
arrays to traverse the tree, so I added some explanation in the classes
javadocs.
Committed the changes to trunk and 4x.
> Simplify TaxoReader ParentArray/ChildrenArrays
> ----------------------------------------------
>
> Key: LUCENE-4565
> URL: https://issues.apache.org/jira/browse/LUCENE-4565
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/facet
> Reporter: Shai Erera
> Assignee: Shai Erera
> Priority: Minor
> Fix For: 4.1, 5.0
>
> Attachments: LUCENE-4565.patch
>
>
> 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 calls:
> {code}
> int[] parents = taxoReader.getParentArray();
> int[] youngestChilds = taxoReader.getChildrenArrays().getYoungestChildArray();
> int[] olderSiblings = taxoReader.getChildrenArrays().getOlderSiblingArray();
> {code}
> one would make these calls:
> {code}
> int[] parents = taxoReader.getParentInfo().parents();
> int[] youngestChilds = taxoReader.getParentInfo().youngestChilds();
> int[] olderSiblings = taxoReader.getParentInfo().olderSiblings();
> {code}
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]