[ https://issues.apache.org/jira/browse/LUCENE-4604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shai Erera updated LUCENE-4604: ------------------------------- Summary: Implement OrdinalPolicy.NO_PARENTS (was: Implement LeavesOnlyOrdinalPolicy) > Implement OrdinalPolicy.NO_PARENTS > ---------------------------------- > > Key: LUCENE-4604 > URL: https://issues.apache.org/jira/browse/LUCENE-4604 > Project: Lucene - Core > Issue Type: Improvement > Components: modules/facet > Reporter: Shai Erera > Assignee: Shai Erera > Priority: Minor > Fix For: 4.1, 5.0 > > > Over at LUCENE-4602, Mike explored the idea of writing just the leaf nodes in > the fulltree posting, rather than the full hierarchy. I wrote this simple > OrdinalPolicy which achieves that: > {code} > DefaultFacetIndexingParams indexingParams = new DefaultFacetIndexingParams() { > @Override > protected OrdinalPolicy fixedOrdinalPolicy() { > return new OrdinalPolicy() { > public void init(TaxonomyWriter taxonomyWriter) {} > public boolean shouldAdd(int ordinal) { return false; } > }; > } > }; > {code} > I think that we should add it as a singleton class to > OrdinalPolicy.EXACT_CATEGORIES_ONLY, as wel as make DefaultOrdPolicy as > singleton too, under the name FULL_HIERARCHY (feel free to suggest a better > name). -- 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org