[ 
https://issues.apache.org/jira/browse/LUCENE-9946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17337741#comment-17337741
 ] 

Robert Muir commented on LUCENE-9946:
-------------------------------------

{quote}
I was aiming for consistency with the approach taken in LongValueFacetCounts, 
but if there's a better way to do this, I'm all for it (and maybe it's an 
opportunity to improve on LongValueFacetCounts as well).
{quote}

I see, it is a pre-existing condition with {{LongValueFacetCounts}}.

I didn't mean to increase scope of this issue, we can add the {{LongRange}} and 
{{DoubleRange}} and then fix the public api of all 3 classes in a separate 
issue. Or fix it here, or first in a separate issue, doesn't matter. I would 
just open JIRA issues so we don't forget.

SortedSetDocValuesFacetCounts is also bad (consistency-wise): this only 
supports {{SORTED_SET}} fields but not {{SORTED}}. It's a one-liner to change 
{{reader.getSortedSetDocValues()}} to {{DocValues.getSortedSet()}} helper 
method, so that single-valued fields work too.  I'd then consider renaming 
{{SortedSetDocValuesFacetCounts}} to something like 
{{StringDocValuesFacetCounts}} as it supports {{SORTED}} type too.

If such single-valued optimizations really help for numerics (?), maybe we 
should look into also applying them to {{SortedSetDocValuesFacetCounts}} too 
(the doc ordinals are basically just a numeric dv field after all)

> 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

Reply via email to