Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-5022

Add FacetResult.mergeHierarchies

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.4, 6.0
    • modules/facet
    • None
    • New, Patch Available

    Description

      When you DrillSideways on a hierarchical dimension, and especially when you OR multiple drill-downs together, you get several FacetResults back, one for each category you drill down on. So for example, if you want to drill-down on Date/2010 OR Date/2011/May, the FacetRequests that you need to create (to get the sideways effect) are: Date/, Date/2010, Date/2011 and Date/2011/May. Date/ is because you want to get sideways counts as an alternative to Date/2010, and Date/2011 in order to get months count as an alternative to Date/2011/May.

      That results in 4 FacetResult objects. Having a utility which merges all FacetResults of the same dimension into a single hierarchical one will be very useful for e.g. apps that want to display the hierarchy. I'm thinking of FacetResult.mergeHierarchies which takes a List<FacetResult> and returns the merged ones, one FacetResult per dimension.

      Attachments

        1. LUCENE-5022.patch
          18 kB
          Shai Erera
        2. LUCENE-5022.patch
          16 kB
          Shai Erera

        Activity

          People

            shaie Shai Erera
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: