:      <str name="mm">2&lt;-25%</str>
:     </lst>
:   </requestHandler>
: 
: correct me if i am wrong isn't the above mm config means if its 1 or 2 
: terms then match all but if its more than 2 terms then 25% can be 
: missing. i get below as parsed query

This is exactly what you asked in another thread, which i answered in the 
other thread...

http://www.nabble.com/multiword-query-using-dismax-to20920925.html#a20920925

...by refering to this exact example in the dismax docs...

http://wiki.apache.org/solr/DisMaxRequestHandler

both of the examples below ultimately mean that for more then 2 clauses 
"25% can be missing" ... the difference is in how fractions are dealt 
with: the percentage of the total number of clauses is computed and then 
rounded down to get an integer.  If there was a minus sign in front of the 
percentage that integer is subtracted from the total number of clauses...

   2<-25% ... 25% of 3 is 0.75, 0.75 rounded down is 0, 3-0 is 3
   2<75%  ... 75% of 3 is 2.25, 2.25 rounded down is 2.

this is also mentioned *explicitly* in the other URL i refered you to last 
time... 
http://lucene.apache.org/solr/api/org/apache/solr/util/doc-files/min-should-match.html

>> When dealing with percentages, negative values can be used to get 
>> different behavior in edge cases. 75% and -25% mean the same thing when 
>> dealing with 4 clauses, but when dealing with 5 clauses 75% means 3 are 
>> required, but -25% means 4 are required.

It sounds like you want 75% instead of -25%


-Hoss

Reply via email to