Hi Jack,

thanks!

fq=((*:* -(field1:value1)))+OR+(field2:value2).

This is the solution.

Johannes

Am 11.02.2014 17:22, schrieb Jack Krupansky:
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

--
Johannes Siegert
Softwareentwickler

Telefon:  0351 - 418 894 -73
Fax:      0351 - 418 894 -99
E-Mail:   johannes.sieg...@marktjagd.de
Xing:     https://www.xing.com/profile/Johannes_Siegert2

Webseite: http://www.marktjagd.de
Blog:     http://blog.marktjagd.de
Facebook: http://www.facebook.com/marktjagd
Twitter:  http://twitter.com/Marktjagd
______________________________________________________

Marktjagd GmbH | Schützenplatz 14 | D - 01067 Dresden

Geschäftsführung: Jan Großmann
Sitz Dresden | Amtsgericht Dresden | HRB 28678

Reply via email to