Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 27255 invoked from network); 13 Apr 2008 11:39:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Apr 2008 11:39:12 -0000 Received: (qmail 56084 invoked by uid 500); 13 Apr 2008 11:39:06 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 56048 invoked by uid 500); 13 Apr 2008 11:39:06 -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 56037 invoked by uid 99); 13 Apr 2008 11:39:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Apr 2008 04:39:05 -0700 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: domain of wojtekh2@gmail.com designates 209.85.132.242 as permitted sender) Received: from [209.85.132.242] (HELO an-out-0708.google.com) (209.85.132.242) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Apr 2008 11:38:24 +0000 Received: by an-out-0708.google.com with SMTP id c5so377444anc.49 for ; Sun, 13 Apr 2008 04:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=wScu97Ca8DSLFaTAGSEDOTDkU6ihhi3ug/zr05F8ahw=; b=SE1Xx+hcDDaXQHeZMtfaROghqknYgNogQfFw+SF4RR99Yf1f3hRaPFxP3nyGQV9c5m8fLOiKAKIy2zLXzB1u6KLS79DwzTq0PDrETC2IDzENN7isyIAddp6tTVwRKT+WZ2H4SMY6xg3zO9NUU9M6GVOLRz13vW0C/GYcyz8vZug= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RH65WYPbDzdZWFuvJuvBcagyp5q6G8O2jnNlKgi515w1leYrHcUsPOjJjewIUt6ahwx/kGs5pFfPgn2OOsoPNXRXcHKllSPmkUyDlkImQUK8Of6XPDHhYoxe5e3hjm8F0oCRaznaNJtJqnALgd1cfpKZbxMVvBM8MxO9zji2UKU= Received: by 10.100.110.16 with SMTP id i16mr9736186anc.40.1208086715501; Sun, 13 Apr 2008 04:38:35 -0700 (PDT) Received: by 10.100.229.4 with HTTP; Sun, 13 Apr 2008 04:38:35 -0700 (PDT) Message-ID: <329a6c830804130438v7bb9df07mc212fdd17d693f6b@mail.gmail.com> Date: Sun, 13 Apr 2008 13:38:35 +0200 From: "Wojtek H" To: java-user@lucene.apache.org Subject: Re: Document ids in Lucene index In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <329a6c830804090948p75e5a954ka17b4debdd9d148f@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org 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