lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: NOT Operator with Parenthesis
Date Mon, 26 Oct 2015 14:33:48 GMT
Solr does not do strict Boolean logic, although it comes close. See:


On Sun, Oct 25, 2015 at 11:18 PM, patel mrugesh
<> wrote:
>   Hi All,
> We are using Lucene 4.10.3, one strange behavior we have observed when NOT operator is
used with parenthesis around.
> It looks like NOT operator is completely ignored and whatever boolean operator was before
parenthesis is applied.
> For example, document text: "lottery ticket", query: "lottery NOT ticket". As expected,
this query will not produce a match for this document. However, if this query is slightly
modified and converted to "lottery (NOT ticket)" or "lottery AND (NOT ticket)" then match
is produced. It behaves as if query becomes "lottery AND ticket" instead, completely ignoring
> Please somebody can shed light on this?
> Thanks,Mrugesh

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

View raw message