Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
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!