lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Krkoska (JIRA)" <>
Subject [jira] [Commented] (SOLR-3740) ExtendedDismaxQParser (edismax) does not obey q.op for parenthesized sub-queries
Date Sun, 07 Oct 2012 17:52:02 GMT


Michael Krkoska commented on SOLR-3740:

I ran into this issue with a simple query like "ID100", which gets rewritten by a WordDelimiterFilter
in my config into "(text:ID text:100)". Unfortunately my q.op=AND is not passed on to the
underlying query parser, which results in a OR, as that's the default.


up.setDefaultOperator(QueryParsing.getQueryParserDefaultOperator(req.getSchema(), solrParams.get(QueryParsing.OP)));

in line 193 of ExtendedDismaxQParserPlugin fixes the bug for me and seems sensible.

Please look into this before 4.0 release, as it seems to be a rather serious bug.
> ExtendedDismaxQParser (edismax) does not obey q.op for parenthesized sub-queries
> --------------------------------------------------------------------------------
>                 Key: SOLR-3740
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6.1, 4.0-BETA
>            Reporter: Jack Krupansky
> For a query such as "cat dog (fox bat fish)" with &q.op=AND, the default query operator
is only set to AND for the top-level query, and not for the parenthesize sub-query. This is
not documented behavior and rather surprising.
> This happens 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 parsing and query generation
for the parenthesized sub-query.
> 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.

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

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

View raw message