lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] Commented: (SOLR-1384) Allow fq or q to specify boolean query min must match like dismax's mm parameter
Date Tue, 01 Sep 2009 23:27:32 GMT


Hoss Man commented on SOLR-1384:

I haven't looked at the match, but if anything the param should be "minShouldMatch" not "minMustMatch"
... the word "Should" is a noun in this case ... it refers to the fact that the underlying
clauses are "SHOULD" clauses ... not "MUST" clauses.

Off the top of my head: if this is really something people think should be generally supported
for all types of queries, then SolrQueryParser seems like the right place to do it, adding
anew setDefaultMinShouldMatch method that changes the behavior of all BooleanQuery objects
produced -- then LuceneQParserPlugin would just look at the params and set the option on the
parser appropriately.

FYI: once upon a time, there was talk in Lucene-Java about extending the syntax to lete you
specify this in the query string, using something like...

  (boolcluase1 boolclause2 boolclause3)~2

...hence the reason i suggest thinking of this as a _default_ minshould match on the parser
... some syntaxes in subclasses might override it.

> Allow fq or q to specify boolean query min must match like dismax's mm parameter
> --------------------------------------------------------------------------------
>                 Key: SOLR-1384
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.4
>            Reporter: Preetam Rao
>            Priority: Minor
>             Fix For: 1.5
>         Attachments: SOLR-1384.patch
> Dis max query provides "mm" parameter that can be set on the underlying Lucene Boolean
OR query using setMinimumNumberShouldMatch()  method.
> It will be great if we can have the same support on any fq or q that specifies more than
one term. This means we don't need to switch to dis max query just for this one use case.
> Example might look like this:
> fq={!minMustMatch=75%}street:"917 Z st NW Washington DC"
> Full supported syntax for the value allowed should be this:
> This is the underlying lucene facility:

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message