Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 61130 invoked from network); 1 Sep 2009 23:28:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Sep 2009 23:28:02 -0000 Received: (qmail 17657 invoked by uid 500); 1 Sep 2009 23:28:01 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 17583 invoked by uid 500); 1 Sep 2009 23:28:01 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 17573 invoked by uid 99); 1 Sep 2009 23:28:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 23:28:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 23:27:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BA217234C004 for ; Tue, 1 Sep 2009 16:27:32 -0700 (PDT) Message-ID: <1173744233.1251847652736.JavaMail.jira@brutus> Date: Tue, 1 Sep 2009 16:27:32 -0700 (PDT) From: "Hoss Man (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Commented: (SOLR-1384) Allow fq or q to specify boolean query min must match like dismax's mm parameter In-Reply-To: <1589448418.1251264539289.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.