[
https://issues.apache.org/jira/browse/SOLR-16004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17491088#comment-17491088
]
Michael Gibney commented on SOLR-16004:
---------------------------------------
PR #625 implements support for these. It only works with String field and
{{TopLevelDocValuesTermsQuery}} (introduced in SOLR-13890), but I think that
should be ok?
The first three commits serve different purposes. The _new_ functionality is
added in the third commit. The first commit updates the class to more directly
use OrdinalMap (as opposed to doing ordinal lookup through SlowAtomic) -- iiuc
this is the essence of what [~mkhl] had been suggesting [in this comment on
SOLR-13890|https://issues.apache.org/jira/browse/SOLR-13890?focusedCommentId=17009789#comment-17009789].
The second commit special-cases the single and multi per-segment dv
implementations, avoiding wrapping at the segment level (a similar approach is
taken in
[FacetFieldProcessorByArrayDV|https://github.com/apache/solr/blob/9903d00b0fb6216f836bb580f42d0081b7b41584/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java#L146-L174]).
I have not yet added tests for the new functionality, but I wanted to share
this work in its current state. Anyone interested in picking this up is more
than welcome to do so :-)
> Add support for minShouldMatch and tolerateOtherTerms in {!terms}
> TermsQParserPlugin
> ------------------------------------------------------------------------------------
>
> Key: SOLR-16004
> URL: https://issues.apache.org/jira/browse/SOLR-16004
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: query parsers
> Affects Versions: main (10.0)
> Reporter: Michael Gibney
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In Solr, the TermsQParser considers a match if _any_ term in a doc/field
> matches. It can be useful in some contexts (e.g., access control, etc.) to
> require that a certain threshold of terms match, or to require exclusive
> presence of enumerated terms (i.e., place a limit on the number of terms that
> exist in a document that have _not_ been explicitly enumerated in the query).
> As a point of comparison, Elasticsearch implements the former feature as the
> [minimum_should_match_field
> param|https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-set-query.html#terms-set-field-params]
> on its "Terms set query" (the latter feature -- exclusive presence -- is
> afaict not implemented).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]