[ https://issues.apache.org/jira/browse/LUCENE-9946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17337498#comment-17337498 ]
Robert Muir commented on LUCENE-9946: ------------------------------------- I'm confused, why make the user provide a {{multivalued}} boolean? I suggest using {{DocValues.getSortedNumeric}} helper method which works for both multi-valued and single-valued fields: https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/DocValues.java#L378 You can then optionally use your {{unwrapSingleton}} to detect single-valued case and use separate optimized algorithm. This also works for cases where the user used multi-valued field type but only indexed single-valued data in practice (the codec detects this case today and wraps it DocValues.singleton). There's a similar {{DocValues.getSortedSet}} equivalent for the string case, hopefully facets is already doing similar stuff (have not looked). > Support multi-value fields in range facet counting > -------------------------------------------------- > > Key: LUCENE-9946 > URL: https://issues.apache.org/jira/browse/LUCENE-9946 > Project: Lucene - Core > Issue Type: Improvement > Components: modules/facet > Affects Versions: main (9.0) > Reporter: Greg Miller > Priority: Minor > > The {{RangeFacetCounts}} implementations ({{LongRangeFacetCounts}} and > {{DoubleRangeFacetCount}}) only work on single-valued fields today. In > contrast, the more recently added {{LongValueFacetCounts}} implementation > supports both single- and multi-valued fields (LUCENE-7927). I'd like to > extend multi-value support to both of the {{LongRangeFacetCounts}} > implementations as well. > Looking through the implementations, I can't think of a good reason to _not_ > support this, but maybe I'm overlooking something? -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org