Solr/Lucene is not strictly Boolean logic, this trips up a lot
of people.

Excellent blog on the subject here:
http://searchhub.org/dev/2011/12/28/why-not-and-or-and-not/

Best,
Erick


On Tue, Feb 11, 2014 at 8:22 AM, Jack Krupansky <j...@basetechnology.com>wrote:

> With so many parentheses in there, I wonder what you are really trying to
> do!!!! Try expressing your query in simple English first so that we can
> understand your goal.
>
> But generally, a purely negative nested query must have a *:* term to
> apply the exclusion against:
>
> fq=((*:* -(field1:value1)))+OR+(field2:value2).
>
> -- Jack Krupansky
>
> -----Original Message----- From: Johannes Siegert
> Sent: Tuesday, February 11, 2014 10:57 AM
> To: solr-user@lucene.apache.org
> Subject: solr-query with NOT and OR operator
>
>
> Hi,
>
> my solr-request contains the following filter-query:
>
> fq=((-(field1:value1)))+OR+(field2:value2).
>
> I expect solr deliver documents matching to ((-(field1:value1))) and
> documents matching to (field2:value2).
>
> But solr deliver only documents, that are the result of (field2:value2).
> I receive several documents, if I request only for ((-(field1:value1))).
>
> Thanks!
>
> Johannes
>

Reply via email to