You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2012/12/10 06:13:20 UTC
[jira] [Created] (LUCENE-4604) Implement LeavesOnlyOrdinalPolicy
Shai Erera created LUCENE-4604:
----------------------------------
Summary: Implement LeavesOnlyOrdinalPolicy
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org