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

Add getAllChildren functionality to facets

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.3
    • modules/facet
    • None
    • New

    Description

      Currently Lucene does not support returning range counts sorted by label values, but there are use cases demanding this feature. For example, a user specifies ranges (e.g., [0, 10], [10, 20]) and wants to get range counts without changing the range order. Today we can only call getTopChildren to populate range counts, but it would return ranges sorted by counts (e.g., [10, 20] 100, [0, 10] 50) instead of range values. 

      Lucene has a API, getAllChildrenSortByValue, that returns numeric values with counts sorted by label values, please see LUCENE-7927 for details. Therefore, it would be nice that we can also have a similar API to support range counts. The proposed getAllChildren API is to return value/range counts sorted by label values instead of counts. 

      This proposal was inspired from the discussions with gsmiller when I was working on the LUCENE-10538 PR, and we believe users would benefit from adding this API to Facets. 

      Hope I can get some feedback from the community since this proposal would require changes to the getTopChildren API in RangeFacetCounts. Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            yutinggan Yuting Gan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 40m
                2h 40m