[ https://issues.apache.org/jira/browse/LUCENE-4604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shai Erera updated LUCENE-4604: ------------------------------- Attachment: LUCENE-4604.patch Patch removes DefaultOrdinalPolicy in favor OrdinalPolicy.ALL_PARENTS. Also adds OrdPolicy.NO_PARENTS (related to LUCENE-4600). In that spirit, I also removed DefaultPathPolicy in favor of PathPolicy.ALL_CATEGORIES. In general, I chose specific names over e.g. DEFAULT_POLICY, because I think that 'default' in the name is bad. E.g., if following the results in LUCENE-4600 we'll decide to change the default policy, the name 'default' in the name will be problematic. I improved javadocs, to explain better what OrdinalPolicy and PathPolicy are, and the purpos of each of the new instances. All tests pass, I think this is ready to commit. > 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 > > Attachments: LUCENE-4604.patch > > > 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