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

Alan Woodward commented on LUCENE-8613:
---------------------------------------

The major hurdle is that at query time, we don't know how many entries there 
are in a multi-valued field (docvalues de-duplicate, so you can't just count 
the number of entries in a sorted set).  So the general way to do this is to 
add another field at index time containing the number of values, and then pass 
LongValuesSource.fromLongField(fieldname) to the CoveringQuery to retrieve this 
value.

> CoveringQuery to use multi-valued field length as minimum match
> ---------------------------------------------------------------
>
>                 Key: LUCENE-8613
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8613
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: 7.5
>            Reporter: Tristan Stevens
>            Priority: Minor
>
> Currently CoveringQuery uses a long field's value for the minimumMatch for 
> each document.
> There are use cases where this value may be derived from the length of a 
> multi-valued field (including docValues).
> This request is to support an alternative constructor and implementation for 
> CoveringQuery to take a field name that can be used for the per-document 
> minimum match value.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to