Re: Question about BooleanQuery

2012-08-23 Thread Jack Krupansky
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

Re: Question about BooleanQuery

2012-08-23 Thread heikki
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 )

Re: Question about BooleanQuery

2012-08-23 Thread Jack Krupansky
cene.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

Re: Question about BooleanQuery

2012-08-23 Thread heikki
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

Re: Question about BooleanQuery

2012-08-23 Thread Jack Krupansky
Step 1, fully parenthesize your boolean to show your desired order of execution. The Lucene BooleanQuery does not do a pure Boolean evaluation. You have the same sub-expression in your NOT clause - that's probably what guarantees zero results. And you have an unmatched right parenthesis at the