Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1, 6.0
    • Component/s: modules/facet
    • Labels:
      None
    • Lucene Fields:
      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).

        Attachments

          Activity

            People

            • Assignee:
              shaie Shai Erera
              Reporter:
              shaie Shai Erera
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: