Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.6.1, 4.0-BETA
-
None
-
None
Description
If a field type analyzer splits a query token into multiple terms when the classic Lucene query parser is called from the edismax query parser, the terms will always be combined with the "OR" operator even if the user has explicitly set the default query operator to "AND" with the "q.op" request parameter.
This is because edismax only simulates the default operator by forcing "mm" (minMatch) to 100% for the top-level BooleanQuery alone and never sets the default query operator when it invokes the classic Lucene Query parser which in turn is performing the term analysis and generation of the nested Boolean Query for the sub-terms.
One solution is for edismax to always set the default query operator when calling the classic Lucene query parser, or at least when q.op=AND.
Whether to also set the Lucene default query operator to AND when mm=100% is another possibility, but subject to debate. It is asserted that mm=100% is only supposed to apply to the top-level query and not to any nested (parenthesized or split term) queries, but I suggest that failing to treat mm=100% as if q.op=AND will lead to more confusion and surprise for non-expert users than doing so. Note that there is no current API for setting the default minMatch for the classic Lucene query parser, and even if there were, the question of whether it should only apply to the top-level query would still arise.
Attachments
Issue Links
- relates to
-
SOLR-3589 Edismax parser does not honor mm parameter if analyzer splits a token
- Closed