You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by vinay kumar kaku <vk...@hotmail.com> on 2008/12/09 19:44:32 UTC

multiword query using dismax

Hi,
   i have this config in my solrconfig.xml 


<requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
    <lst name="defaults">
     <str name="echoParams">explicit</str>
     <float name="tie">0</float>
     <str name="qf">
        field1^1.1 field2^1.2 field3^1.3 field4^1.4 field5^1.5
     </str>
     <str name="pf">
        field4^1.4 field5^1.5
     </str>
        <str name="ps">1</str>
        <str name="mm">2&lt;-25%</str>
    </lst>
  </requestHandler>


my query is = monty+python+scandal

when
i just issue monty+python i get bunch of documents but when i issue
monty+python+scandal then i just get 1. isn't the case that i should
get documents which match monty+python+scandal then followed by 
documents that match monty+python or python+scandal or monty+scandal as per mm criteria?

can
some one explain from above example how many clauses we have ( i think
it is 4 since 3 words across five fields and a phrase boost correct me
if i am wrong) for minimal match criteria.


thanks,
vinay
_________________________________________________________________
Suspicious message? There’s an alert for that. 
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad2_122008

Re: multiword query using dismax

Posted by Chris Hostetter <ho...@fucit.org>.
:         <str name="mm">2&lt;-25%</str>

: my query is = monty+python+scandal

: i just issue monty+python i get bunch of documents but when i issue
: monty+python+scandal then i just get 1. isn't the case that i should
: get documents which match monty+python+scandal then followed by 
: documents that match monty+python or python+scandal or monty+scandal as per mm criteria?

as mentioned on the wiki...
	http://wiki.apache.org/solr/DisMaxRequestHandler

	If there are less then 3 optional clauses, they all must match; 
	if there are 3 or more, then 75% must match, rounded up: "2<-25%"

...75% of 3 is 2.25, rounded up is 3, so all 3 words are required.

more details can be found in the docs...
http://lucene.apache.org/solr/api/org/apache/solr/util/doc-files/min-should-match.html

: some one explain from above example how many clauses we have ( i think
: it is 4 since 3 words across five fields and a phrase boost correct me
: if i am wrong) for minimal match criteria.

the mm only applies to the clauses from the words, you have 3 words, so 
you have 3 clauses.  if you used quotes, there are less...

	monty python scandal   ... 3 clauses
	"monty python" scandal ... 2 clauses


-Hoss