Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 40296 invoked from network); 14 Apr 2008 03:26:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Apr 2008 03:26:56 -0000 Received: (qmail 44361 invoked by uid 500); 14 Apr 2008 03:26:50 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 44320 invoked by uid 500); 14 Apr 2008 03:26:50 -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 44309 invoked by uid 99); 14 Apr 2008 03:26:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Apr 2008 20:26:50 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [206.190.39.214] (HELO web50312.mail.re2.yahoo.com) (206.190.39.214) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 14 Apr 2008 03:25:57 +0000 Received: (qmail 74411 invoked by uid 60001); 14 Apr 2008 03:26:17 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=Ztuz3jj4Rnlbm6hqGfnBdttkIx9ql9JynJHwldUPV6GHdnq8rvtQlDiVtDewMURnbL4p78PZ8+o1tiD51UxlTdKv2Ze1Ygca711EJIjizqdXNRSnMQHWa1H0aDHqxH2/x0mzslPEZNUQ0A9gbxd4zzW1d+Cp7ue57xhKD5nN7jo=; X-YMail-OSG: ulptnNYVM1nF_AJ4BDOgYy1owm9xuy8i6x2MV6DbbO1WnktyghsuEnPuvU6LkXQgFbDqxuglOepicB8BE8Yh59ToVY5xYN85xVmW6H5xevpfo62AHOBoP6FpIM89wLhVLlEIGPXu4cbFgxfFhwVTPmaog6eGaHaTEiD5yesr9A-- Received: from [72.231.9.236] by web50312.mail.re2.yahoo.com via HTTP; Sun, 13 Apr 2008 20:26:17 PDT X-Mailer: YahooMailRC/902.40 YahooMailWebService/0.7.185 Date: Sun, 13 Apr 2008 20:26:17 -0700 (PDT) From: Otis Gospodnetic Subject: Re: Document ids in Lucene index To: java-user@lucene.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <889772.74361.qm@web50312.mail.re2.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org Wojtek, yes, that's how you can loop through all docs in the index. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- From: Wojtek H To: java-user@lucene.apache.org Sent: Sunday, April 13, 2008 1:38:35 PM Subject: Re: Document ids in Lucene index Thank you for the answer. So it means that I can without any problems iterate over index documents using this algoritm (I don't want to use MatchAllQuery): - check maxDoc() - iterate from 0 to maxDoc() and process doc if it is not deleted Am I right? Best, wojtek 2008/4/12, Chris Hostetter : > > : I am wondering if there are possible "holes" in set of index documents > > : ids. Being more specific - is it possible that there exist integer i > : between 0 and IndexReader.maxDoc() such that > : reader.document(i) == null > : and > : reader.isDeleted(i)==false > > : ??? > > That should not ever happen ... if it does, I would consider it a bug > until someone smarter then me explained why it isn't. > > (minor nit: document(i) won't ever return null, if you call it on a > deleted docId you'll get an IllegalArgumentException) > > > -Hoss > > > --------------------------------------------------------------------- > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org