lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
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

    [ https://issues.apache.org/jira/browse/SOLR-1384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750178#action_12750178
] 

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...

{code}
  (boolcluase1 boolclause2 boolclause3)~2
{code}

...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: https://issues.apache.org/jira/browse/SOLR-1384
>             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:
> http://lucene.apache.org/solr/api/org/apache/solr/util/doc-files/min-should-match.html
> This is the underlying lucene facility:
> http://www.netlikon.de/docs/javadoc-lucene/lucene_1_9/org/apache/lucene/search/BooleanQuery.html#setMinimumNumberShouldMatch%28int%29

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


Mime
View raw message