Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 33961 invoked from network); 5 Mar 2009 01:26:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Mar 2009 01:26:37 -0000 Received: (qmail 82714 invoked by uid 500); 5 Mar 2009 01:26:30 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 82676 invoked by uid 500); 5 Mar 2009 01:26:30 -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 82665 invoked by uid 99); 5 Mar 2009 01:26:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 17:26:29 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [203.217.22.128] (HELO file1.syd.nuix.com) (203.217.22.128) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2009 01:26:22 +0000 Received: from [192.168.222.60] (monolith.syd.nuix.com [192.168.222.60]) by file1.syd.nuix.com (Postfix) with ESMTP id DC17D4A8163 for ; Thu, 5 Mar 2009 12:25:59 +1100 (EST) Message-ID: <49AF2A30.3080003@nuix.com> Date: Thu, 05 Mar 2009 12:26:08 +1100 From: Daniel Noll Organization: Nuix Pty Ltd User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: Optimum way to find all document without particular field References: <68959F25CDEBCB4F917D5A253291D73E0D831446C2@BLRKECMBX06.ad.infosys.com> <49AEC7E1.8030901@gmail.com> In-Reply-To: <49AEC7E1.8030901@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Chris Lu wrote: > Allahbaksh, > > If you ONLY want to find all document with a particular field that is > not null, you can loop through the TermEnum and TermDocs to find all the > document ids. > But this can not easily be combined with other queries. Surely this would be equivalent to a PrefixQuery with a prefix of "". Assuming the query parser is well behaved (I can no longer remember whether the default one is or not), field:* should create one. This is assuming you have already indexed the data. If you can reindex then clearly adding a placeholder value for "no content" is more efficient. Daniel -- Daniel Noll Forensic and eDiscovery Software Senior Developer The world's most advanced Nuix email data analysis http://nuix.com/ and eDiscovery software --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org