Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
New, Patch Available
Description
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:
DefaultFacetIndexingParams indexingParams = new DefaultFacetIndexingParams() { @Override protected OrdinalPolicy fixedOrdinalPolicy() { return new OrdinalPolicy() { public void init(TaxonomyWriter taxonomyWriter) {} public boolean shouldAdd(int ordinal) { return false; } }; } };
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).