lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Rowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9174) After Solr 5.5, mm parameter doesn't work properly
Date Fri, 10 Jun 2016 05:45:21 GMT

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

Steve Rowe commented on SOLR-9174:
----------------------------------

David, when I run your query against 5.4.1, it does indeed match 3 documents, but I see two
problems:

1. The parsedquery includes no minShouldMatch at all:

{noformat}
"parsedquery":"(+(DisjunctionMaxQuery((text:ipod)) (+DisjunctionMaxQuery((text:power)) +DisjunctionMaxQuery((text:nonexistentword)))))/no_coord",
{noformat}

2. The mm spec "2>-1" means: if there are two or fewer optional clauses, then all clauses
are required; if there are more than 2 optional clauses, then all but one is required.  In
your query, there are only two optional clauses, so both are required in the case that minShouldMatch
applies.

By contrast, in 5.5.0, the parsedquery includes a minShouldMatch of 2:

{noformat}
    "parsedquery":"(+((DisjunctionMaxQuery((text:ipod)) (+DisjunctionMaxQuery((text:power))
+DisjunctionMaxQuery((text:nonexistentword))))~2))/no_coord",
{noformat}

If I change the mm spec to "1>-1" (if more than one optional clause, then all but one is
required), then the parsedquery includes a minShouldMatch of 1, and I get 3 hits.

So I don't think you were "having it both ways"; rather, your explicit mm spec was being ignored
when you included explicit operators in queries against Solr < 5.5.0.


> After Solr 5.5, mm parameter doesn't work properly
> --------------------------------------------------
>
>                 Key: SOLR-9174
>                 URL: https://issues.apache.org/jira/browse/SOLR-9174
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers, search
>    Affects Versions: 5.5, 6.0, 6.0.1
>            Reporter: Issei Nishigata
>
> “mm" parameter does not work properly, when I set "q.op=AND” after Solr 5.5.
> In Solr 5.4, mm parameter works expectedly with the following setting.
> [schema]
> {code:xml}
> <fieldType name="bi_gram" class="solr.TextField">
>   <analyzer>
>     <tokenizer class="solr.NGramTokenizerFactory" minGramSize="2" maxGramSize="2"/>
>   </analyzer>
> </fieldType>
> {code}
> [request]
> {quote}
> http://localhost:8983/solr/collection1/select?defType=edismax&q.op=AND&mm=2&q=solar
> {quote}
> After Solr 5.5, the result will not be the same as Solr 5.4.
> [Solr 5.4]
> {code:xml}
> <response>
> ...
>   <lst name="params">
>     <str name="mm">2</str>
>     <str name="q">solar</str>
>     <str name="defType">edismax</str>
>     <str name="q.op">AND</str>
>   </lst>
> ...
> <result name="response" numFound="1" start="0">
>   <doc>
>     <str name="id">0</str>
>     <arr name="content">
>       <str>solr</str>
>     </arr>
>   </doc>
> </result>
> <lst name="debug">
>   <str name="rawquerystring">solar</str>
>   <str name="querystring">solar</str>
>   <str name="parsedquery">
>   (+DisjunctionMaxQuery((((text:so text:ol text:la text:ar)~2))))/no_coord
>   </str>
>   <str name="parsedquery_toString">+(((text:so text:ol text:la text:ar)~2))</str>
>   ...
> </response>
> {code}
> [Solr 6.0.1]
> {code:xml}
> <response>
> ...
>   <lst name="params">
>     <str name="mm">2</str>
>     <str name="q">solar</str>
>     <str name="defType">edismax</str>
>     <str name="q.op">AND</str>
>   </lst>
> ...
> <result name="response" numFound="0" start="0"/>
>   <lst name="debug">
>     <str name="rawquerystring">solar</str>
>     <str name="querystring">solar</str>
>     <str name="parsedquery">
>     (+DisjunctionMaxQuery(((+text:so +text:ol +text:la +text:ar))))/no_coord
>     </str>
>     <str name="parsedquery_toString">+((+text:so +text:ol +text:la +text:ar))</str>
> ...
> {code}
> As shown above, parsedquery also differs from Solr 5.4 and Solr 6.0.1(after Solr 5.5).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message