Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 1589 invoked from network); 24 Nov 2010 01:04:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Nov 2010 01:04:49 -0000 Received: (qmail 92042 invoked by uid 500); 24 Nov 2010 01:05:13 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 92003 invoked by uid 500); 24 Nov 2010 01:05:13 -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 91995 invoked by uid 99); 24 Nov 2010 01:05:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Nov 2010 01:05:13 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nabiber@gmail.com designates 209.85.213.48 as permitted sender) Received: from [209.85.213.48] (HELO mail-yw0-f48.google.com) (209.85.213.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Nov 2010 01:05:05 +0000 Received: by ywk9 with SMTP id 9so263496ywk.35 for ; Tue, 23 Nov 2010 17:04:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=dFsou69Te/4QFiPkHRk018ApBEAwBU0Wo0gdtmEiEwI=; b=TDiBPVw/Uy1uCCxis8cyL1Ka84bSx0iUpkbNy4BVWwhwzqO5je0kcUH4CbkBvp2H/y RKvSSHelAl+o+WjdDgmxl6fChyMoKDiyRI3AMF00URsZTCTqHGNB7Q1zWY47Dn0zPStp id1iD6BLfjdgV+yqC4wJjCVV0134IrzLtpdvA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xXBHzqRHd+deib5JUGOZ1DjEATZFE1S++JkMKvXIzDZBVp6/lL7ozqmEc36bcSQ+u4 msUGFjHXO0nvmsS47EQsiaQNjIVYhFdS7kLROt/KBj0m/rl6T1pnLV8q2V/dZQJOWUjM 8/rphmE5PXHy290ZKvKqh1Kl2TniNHOwNb2hs= MIME-Version: 1.0 Received: by 10.100.167.18 with SMTP id p18mr5684402ane.180.1290560684317; Tue, 23 Nov 2010 17:04:44 -0800 (PST) Received: by 10.100.244.10 with HTTP; Tue, 23 Nov 2010 17:04:44 -0800 (PST) Date: Tue, 23 Nov 2010 17:04:44 -0800 Message-ID: Subject: Not query help. From: Nabib El-Rahman To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001485f6d1ae265d6b0495c21329 X-Virus-Checked: Checked by ClamAV on apache.org --001485f6d1ae265d6b0495c21329 Content-Type: text/plain; charset=ISO-8859-1 Hi, What I need is a Not TermQuery. I did not see one in the API, so I did the following: Query query = new BooleanQuery(new BooleanClause(new TermQuery(..), BooleanClause.Occur.MUST_NOT))); This did not produce the correct search result. Does anyone have any idea on how to accomplish this? And is here such a thing as NotTermQuery(..) ? Thanks in advance! -Nabib --001485f6d1ae265d6b0495c21329--