lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (Commented) (JIRA) <>
Subject [jira] [Commented] (SOLR-2649) MM ignored in edismax queries with operators
Date Thu, 02 Feb 2012 20:24:54 GMT


Jan Høydahl commented on SOLR-2649:

So how should the parser interpret these examples?

q=word1 word2 word3 -word4&mm=100%
I agree with Ahmet that here both word1, word2 and word3 must be required since mm is explicitly
specified. If mm is not specified, mm is set from defaultOperator, i.e. AND=>100%, OR=>0

q=word1 word2 word3 -word4%mm=50%
Here you'd expect that two of of the three first words must match.

q=word1 OR word2 word3%mm=100%
Example after having indexed exampledocs:
With ipod OR samsung I get 5 hits. Adding the word "printer" yields 6 hits, i.e. it is OR'ed
too. Here I'd expect the equivalent of (word1 OR word2) AND word3.

q=word1 AND word2 word3%mm=50%
What would you expect for this? Perhaps (word1 AND word2) to be treated as clause1 and word3
as clause2 and then apply mm=1?

q=word1 OR word2 word3 word4 word5%mm=50%
How about this? Again, it would make sense to respect (word1 OR word2) as one clause and then
require two clauses out of the resulting four.
> MM ignored in edismax queries with operators
> --------------------------------------------
>                 Key: SOLR-2649
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.3
>            Reporter: Magnus Bergmark
>            Priority: Minor
> Hypothetical scenario:
>   1. User searches for "stocks oil gold" with MM set to "50%"
>   2. User adds "-stockings" to the query: "stocks oil gold -stockings"
>   3. User gets no hits since MM was ignored and all terms where AND-ed together
> The behavior seems to be intentional, although the reason why is never explained:
>   // For correct lucene queries, turn off mm processing if there
>   // were explicit operators (except for AND).
>   boolean doMinMatched = (numOR + numNOT + numPluses + numMinuses) == 0; 
> (lines 232-234 taken from tags/lucene_solr_3_3/solr/src/java/org/apache/solr/search/
> This makes edismax unsuitable as an replacement to dismax; mm is one of the primary features
of dismax.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message