Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 72855 invoked from network); 15 Jun 2007 01:07:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jun 2007 01:07:55 -0000 Received: (qmail 69131 invoked by uid 500); 15 Jun 2007 01:07:51 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 69082 invoked by uid 500); 15 Jun 2007 01:07:50 -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 69071 invoked by uid 99); 15 Jun 2007 01:07:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 18:07:50 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of antony.sequeira@gmail.com designates 66.249.82.227 as permitted sender) Received: from [66.249.82.227] (HELO wx-out-0506.google.com) (66.249.82.227) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 18:07:46 -0700 Received: by wx-out-0506.google.com with SMTP id t8so612245wxc for ; Thu, 14 Jun 2007 18:07:26 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=R/iZPHnIXKTYfIyPvWqRNAnqTtB+LqbunRmp4HymZrZ8buNrC3AgonQzkIhlmYplRIgAvpGNAdetlPbDH0XgEj5HjiRBVudq2R7vsUh6rsxmjEoXBioHhjVlCfLJaoyZXOR7QZskW7DKarenhNCd/LvuEd03nW5wA4vPZuC7jMA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=reyJghleE+e8rfRiXBAQJEHUijWsH9aQg5zqKMqf+3h9dLL1huZXE1OqO115K2RE/SXSpUxto+ep3fmh38qlEkN5sQqxIKj1y/tpwB1wMS68qBhdgA2Bwzbxi4mYN8Jb5HYRGFzgtD9J4ChS0KqGwLdK/yGcWicSsdWEmFcUYO4= Received: by 10.90.100.2 with SMTP id x2mr2251203agb.1181869645983; Thu, 14 Jun 2007 18:07:25 -0700 (PDT) Received: by 10.90.84.16 with HTTP; Thu, 14 Jun 2007 18:07:25 -0700 (PDT) Message-ID: <6fb33c150706141807rc77450cqcb94184f54d85da7@mail.gmail.com> Date: Thu, 14 Jun 2007 18:07:25 -0700 From: "Antony Sequeira" To: java-user@lucene.apache.org Subject: negative queries MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_95676_15827712.1181869645956" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_95676_15827712.1181869645956 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi I am aware that with Lucene I can not do negative only queries such as -foo:bar But today I ran into an issue where I realized even queries such as +foo:bar +(-goobly:doo) also never return any results. Basically I get the impression that I can not have a clause like +(-x:y) anywhere in my query. Is that a correct ? If this is indeed the case, does anyone have similar issues and how they get around. I 'think' supporting such queries would be good when queries are generated programmatically for whatever reasons (may be from some UI form) In the attached test file I am using string queries and showing the failure case. In my real app, I build lucene query objects tree using BooleanQuery componenets where each component is the result of parsing a snippet of a query, so when I add each snippet as 'MUST' I need to find a way of handling a snippet that is all negative. Writing the above paragraph I am beginning to realize that although my example shows the problem, it might be a wrong example in terms of me getting a solution to it :) Thanks in advance for any feedback and help. -Antony ------=_Part_95676_15827712.1181869645956 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org ------=_Part_95676_15827712.1181869645956--