Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 33053 invoked from network); 10 May 2006 15:29:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 May 2006 15:29:01 -0000 Received: (qmail 6652 invoked by uid 500); 10 May 2006 14:59:31 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 6618 invoked by uid 500); 10 May 2006 14:59:31 -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 6607 invoked by uid 99); 10 May 2006 14:59:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 May 2006 07:59:31 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [69.55.225.129] (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 May 2006 07:59:30 -0700 Received: by ehatchersolutions.com (Postfix, from userid 504) id 798B633C652; Wed, 10 May 2006 10:59:09 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on javelina X-Spam-Level: Received: from [128.143.193.79] (d-128-193-79.bootp.Virginia.EDU [128.143.193.79]) by ehatchersolutions.com (Postfix) with ESMTP id D5A2E33C64B for ; Wed, 10 May 2006 10:59:08 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v749.3) In-Reply-To: <6c33f9950605100232q6eefd51cv2b589c466e56318a@mail.gmail.com> References: <6c33f9950605100232q6eefd51cv2b589c466e56318a@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Adding a new search field but needs searching for all Date: Wed, 10 May 2006 10:59:05 -0400 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.749.3) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.1 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Try a MatchAllDocsQuery combined in a BooleanQuery with a negative clause for b == 1. Erik On May 10, 2006, at 5:32 AM, Chun Wei Ho wrote: > I have a large Lucene index that I am planning on adding one or more > search fields, and perform searches on them. > > How do I include results from the other documents that do not have the > new field? For example, I have 10 million documents in a index, and I > update 200 of them adding the field "b" = 1, 100 of them with field > "b" = 2. How do I write a query such that I can specify "b" != 1 and > get 10million minus 100 (including the ones that do not have the field > "b"). Or do I have to update all the documents (potentially time > consuming since it means deleting and inserting each document in > turn??)? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org