Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 91763 invoked from network); 27 May 2007 08:38:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 May 2007 08:38:29 -0000 Received: (qmail 33731 invoked by uid 500); 27 May 2007 08:38:22 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 33634 invoked by uid 500); 27 May 2007 08:38:21 -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 33594 invoked by uid 99); 27 May 2007 08:38:21 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [204.127.225.93] (HELO alnrmhc13.comcast.net) (204.127.225.93) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 May 2007 01:38:20 -0700 Received: from jma3 (c-71-234-179-126.hsd1.ct.comcast.net[71.234.179.126]) by comcast.net (alnrmhc13) with SMTP id <20070527083754b13000cgqre>; Sun, 27 May 2007 08:37:54 +0000 Reply-To: From: "Joe MarkAnthony" To: Subject: Number of documents in an index with filter Date: Sun, 27 May 2007 04:38:04 -0400 Message-ID: <004601c7a03a$57bd0060$0401a8c0@JMA3> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <8EEADDC8-1B43-4A09-A36F-E505CC6675ED@gmail.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Virus-Checked: Checked by ClamAV on apache.org Greetings, I would like to add the number of possible hits in my queries, for example, "found 18 hits out of a possible 245,000 documents". I am assuming that IndexReader.numDocs() is the best way to get this value. However, I would like to use a filter as part of the query. What is the most efficient way to get the total number of documents given a filter on a query? Thanks, J --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org