And "(NOT booleanField_2 = true )" is really just "booleanField_2 = false",
right? Unless you are looking for fields that are not populated with any
value in addition to an explicit false value.
-- Jack Krupansky
-----Original Message-----
From: heikki
Sent: Thursday, August 23, 2012 9:13 AM
To: java-user@lucene.apache.org
Subject: Re: Question about BooleanQuery
OK, it's not the idea that the nested NOT query has got anything to do with
booleanField_1, so I'll try to phrase very clearly what I want :
the query should return docs where
( someField_1 = 0 OR someField_2 = 0) AND
( booleanField_1 = false ) AND
( NOT ( ( someField_1 = 0 OR someField_2 = 0 ) AND booleanField_2 = true ) )
So, all docs that have value 0 for someField_1 or someField_2, and that have
value false for booleanField_1, but excluded from this, those docs that have
value 0 for someField_1 or someField_2 and value true for booleanField_2.
Come to think of it, it's probably useless to repeat the someFields clause
in the NOT clause, so I'll try simplifying this to
(someField_1 = 0 OR someField_2 = 0) AND
(booleanField_1 = false) AND
(NOT booleanField_2 = true )
Even so, I don't see why my original query doesn't return results.
--
View this message in context:
http://lucene.472066.n3.nabble.com/Question-about-BooleanQuery-tp4002822p4002854.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org