Ah... the way you've phrased it, the nested NOT query will exclude docs even if "booleanField_1:false", so that will guarantee zero results.

It seems like what you want is:

+someField_1:0
+someField_2:0
+booleanField_1:false
-booleanField_2:true

In your original case, the parentheses were causing the problem since your nested query expression was not fully specified - it needed booleanField_1:true.

But, of course, I am guessing what you really want.

-- Jack Krupansky

-----Original Message----- From: heikki
Sent: Thursday, August 23, 2012 8:38 AM
To: java-user@lucene.apache.org
Subject: Re: Question about BooleanQuery

thanks Jack for your answer, however I'm not quite sure what to do with it:

the query is like


 +( someField_1:0 someField_2:0 )
 +booleanField_1:false
 -(
     +( someField_1:0 someField_2:0 )
     +booleanField_2:true
   )

(I put this in 'raw' before, think it might not have shown up in all ways of
viewing this list).

I don't think there is a mis-matched bracket at the end (there was in my
textual description of this though), and I also don't see how this can be
more fully bracketed.

Kind regards
Heikki Doeleman



--
View this message in context: http://lucene.472066.n3.nabble.com/Question-about-BooleanQuery-tp4002822p4002836.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

Reply via email to