Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 19984 invoked from network); 17 Apr 2003 18:35:08 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 17 Apr 2003 18:35:08 -0000 Received: (qmail 27285 invoked by uid 97); 17 Apr 2003 18:37:06 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@nagoya.betaversion.org Received: (qmail 27278 invoked from network); 17 Apr 2003 18:37:06 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 17 Apr 2003 18:37:06 -0000 Received: (qmail 19712 invoked by uid 500); 17 Apr 2003 18:35:06 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 19701 invoked from network); 17 Apr 2003 18:35:06 -0000 Received: from etapestry-colo-32-2.onecall.net (HELO darth?bobo.etapestry.com) (216.37.32.2) by daedalus.apache.org with SMTP; 17 Apr 2003 18:35:06 -0000 Received: from etapestry.com (192.168.1.103 [192.168.1.103]) by darth_bobo.etapestry.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id 2R0A8QHD; Thu, 17 Apr 2003 13:36:52 -0500 Message-ID: <3E9EF3D9.10908@etapestry.com> Date: Thu, 17 Apr 2003 13:35:05 -0500 From: Scott Ganyo User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Users List Subject: Re: usage of prohibit operator '-' References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Lucene only searches for positive results, not negative. If you think of the "-" operator as a subtraction, then you'll understand that Lucene requires that you also select something to subtract from. Scott Lixin Meng wrote: >I am having some problems with the probhibit operator '-'. If anyone can >shed some light on it, I certainly appreciate it. > >In the index, I have a field with field name 'ID'. It tried query like: > > ID:(+ID10) >or > ID:(+"ID10") > >It will returns some hits. > >However, if I try > > ID:(-ID10) >or > ID:(-"ID10") > >I got an empty result set, which should have some records. > >Any idea how to use this prohibit operator? > >Regards, >Lixin > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > -- "They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org