On 9/7/2018 6:59 PM, dshih wrote:
Query:
/select?q={!q.op=AND}mysearchtext*&defType=edismax&debugQuery=true

Result:
"querystring": "{!q.op=AND}mysearchtext*",
"parsedquery": "+DisjunctionMaxQuery(((Synonym(text:q
text:qopandmysearchtext text:{!q.op=and}mysearchtext*) text:op text:and
text:mysearchtext)))"

In the above, I'm just trying to set the query operator to AND while leaving
the default as OR.  It looks like q.op is being completely ignored (and ends
up as part of the search terms).

Since 7.2, you can only use certain localparams if defType is lucene or func.  The lucene parser is the default.  Since you have changed defType to edismax, localparams will not work.   Just add q.op as a separate parameter.

/select?q=mysearchtext*&defType=edismax&debugQuery=true&q.op=AND

Or use mm=100% instead.  Which is effectively what q.op=AND does.

This is the issue that made the change in 7.2:

https://issues.apache.org/jira/browse/SOLR-11501

Thanks,
Shawn

Reply via email to