Thanks Shawn!

In this case I will use operators everywhere.

Johannes


Am 25.06.2014 15:09, schrieb Shawn Heisey:
On 6/25/2014 1:05 AM, Johannes Siegert wrote:
I have defined the following edismax query parser:

<requestHandler name="/search" class="solr.SearchHandler" ><lst
name="defaults"><str name="mm">100%</str><str
name="defType">edismax</str><float name="tie">0.01</float><int
name="ps">100</int><str name="q.alt">*:*</str><str
name="q.op">AND</str><str name="qf">field1^2.0 field2</str><str
name="rows">10</str><str name="fl">*</str></lst>
</requestHandler>


My search query looks like:

q=(word1 word2) OR (word3 word4)

Since I specified AND as default query operator, the query should match
documents by ((word1 AND word2) OR (word3 AND word4)) but the query
matches documents by ((word1 OR word2) OR (word3 OR word4)).

Could anyone explain the behaviour?
I believe that you are running into this bug:

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

It's a very old bug, coming up on three years.  The workaround is to not
use boolean operators at all, or to use operators EVERYWHERE so that
your intent is explicitly described.  It is not much of a workaround,
but it does work.

Thanks,
Shawn

Reply via email to