Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7FB5DEF1 for ; Thu, 23 Aug 2012 13:13:36 +0000 (UTC) Received: (qmail 29618 invoked by uid 500); 23 Aug 2012 13:13:34 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 29471 invoked by uid 500); 23 Aug 2012 13:13:34 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 29462 invoked by uid 99); 23 Aug 2012 13:13:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2012 13:13:34 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of tropicano@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2012 13:13:29 +0000 Received: from ben.nabble.com ([192.168.236.152]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1T4XDf-000195-01 for java-user@lucene.apache.org; Thu, 23 Aug 2012 06:13:07 -0700 Date: Thu, 23 Aug 2012 06:13:06 -0700 (PDT) From: heikki To: java-user@lucene.apache.org Message-ID: <1345727586968-4002854.post@n3.nabble.com> In-Reply-To: References: <1345723762587-4002822.post@n3.nabble.com> <1345725512427-4002836.post@n3.nabble.com> Subject: Re: Question about BooleanQuery MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org