Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 3915 invoked from network); 4 Feb 2005 16:29:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Feb 2005 16:29:14 -0000 Received: (qmail 83580 invoked by uid 500); 4 Feb 2005 16:29:11 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 83542 invoked by uid 500); 4 Feb 2005 16:29:11 -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 83468 invoked by uid 99); 4 Feb 2005 16:29:10 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from ylpvm29-ext.prodigy.net (HELO ylpvm29.prodigy.net) (207.115.57.60) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 04 Feb 2005 08:29:10 -0800 Received: from [192.168.1.10] (adsl-66-143-170-241.dsl.austtx.swbell.net [66.143.170.241]) by ylpvm29.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j14GSsh2007475 for ; Fri, 4 Feb 2005 11:28:55 -0500 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <17786330dc86b97c0eadfe5c5e0554e0@otherwise.com> References: <200502032104.46032.paul.elschot@xs4all.nl> <17786330dc86b97c0eadfe5c5e0554e0@otherwise.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <0036435c21ffa029df9cb7f63144bc09@otherwise.com> Content-Transfer-Encoding: 7bit From: Bill Tschumy Subject: Re: Searching for doc without a field Date: Fri, 4 Feb 2005 10:29:05 -0600 To: "Lucene Users List" X-Mailer: Apple Mail (2.619.2) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Feb 4, 2005, at 10:19 AM, Bill Tschumy wrote: > > On Feb 3, 2005, at 2:04 PM, Paul Elschot wrote: > >> On Thursday 03 February 2005 20:18, Bill Tschumy wrote: >>> Is there any way to construct a query to locate all documents >>> without a >>> specific field? By this I mean the Document was created without ever >>> having that field added to it. >> >> One way is to add an extra document field containing the field >> names of all (other) indexed fields in the document. >> Assuming there is always a primary key field the query is then: >> >> +fieldnames:primarykeyfield -fieldnames:specificfield >> >> Regards, >> Paul Elschot > > Paul, > > Thanks for the suggestion, but I need to do this on an existing > database as it is. > > It just occurred to me that I should try a query on the field with a > value of NULL. Don't know if that will work or not. Nope, using null as a search value just result in a NullPointerException. -- Bill Tschumy Otherwise -- Austin, TX http://www.otherwise.com --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org