Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 90508 invoked from network); 24 May 2007 16:41:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 May 2007 16:41:52 -0000 Received: (qmail 54866 invoked by uid 500); 24 May 2007 16:41:38 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 54833 invoked by uid 500); 24 May 2007 16:41:38 -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 54822 invoked by uid 99); 24 May 2007 16:41:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 09:41:38 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=HTML_00_10,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of carlosjosepita@gmail.com designates 64.233.184.235 as permitted sender) Received: from [64.233.184.235] (HELO wr-out-0506.google.com) (64.233.184.235) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 09:41:32 -0700 Received: by wr-out-0506.google.com with SMTP id 36so254448wra for ; Thu, 24 May 2007 09:41:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=QghkmHOBvDu7TbWiUaL5J9jfdA8jzaods9Z7Cldc/6ndmunuLljxRTc5/RCOv3v965z55rgZ66w7KMebBcjGFTlknkVXHHBnAMeQitTEMxZovQ47l6DP9OtladzZSuMUD3tPA91kBpmVtJRwSYnDi9LpCNdHB34qM3Zxz70Zulk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=f0TlJe0D56PctYYrpYs9B3EVCzGQ22KLc+inRX4CIXpA17GdI+klnSxkv50NU8riPlHWZk0zO8w/N5MxdWsmxUBpbNwY0YFbiptPh9+5dAJygGWIc/M04fxe07kc58N2Ma2HCdPPxEdb+j5dSXyFchbRO1+9yhr5VksGc0In6RQ= Received: by 10.114.88.1 with SMTP id l1mr989867wab.1180024871685; Thu, 24 May 2007 09:41:11 -0700 (PDT) Received: by 10.114.14.6 with HTTP; Thu, 24 May 2007 09:41:11 -0700 (PDT) Message-ID: <7798eaa0705240941y5b420dd3sb2867ed86008dc19@mail.gmail.com> Date: Thu, 24 May 2007 13:41:11 -0300 From: "Carlos Pita" To: java-user@lucene.apache.org Subject: maxDoc and arrays MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_144898_8883524.1180024871467" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_144898_8883524.1180024871467 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, Is there any guaranty that the maxDoc returned by a reader will be about the total number of indexed documents? The motivation of this question is that I want to associate some info to each document in the index, and in order to access this additional data in O(1) I would like to do this through an array indexing. But the array size shouldn't be a lot greater than the total number of documents. I see that something similar is done in the example of section 6.1 of Lucene in Action, but for sorting purposes, which is not my case. Related to this: how can update my array of extra data when documents are added/removed to/from the index? Is there any feedback mechanism by means of callbacks or event handlers? Thank you in advance. Regards, Carlos ------=_Part_144898_8883524.1180024871467--