Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 269029EBC for ; Sun, 3 Jun 2012 19:48:04 +0000 (UTC) Received: (qmail 19839 invoked by uid 500); 3 Jun 2012 19:48:03 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 19792 invoked by uid 500); 3 Jun 2012 19:48:03 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 19785 invoked by uid 99); 3 Jun 2012 19:48:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2012 19:48:02 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of uwe@thetaphi.de designates 188.138.97.18 as permitted sender) Received: from [188.138.97.18] (HELO mail.sd-datasolutions.de) (188.138.97.18) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2012 19:47:56 +0000 Received: from dynamic60.alien.c-base.org (unknown [194.29.236.67]) by mail.sd-datasolutions.de (Postfix) with ESMTPSA id 52D8B14AA13D for ; Sun, 3 Jun 2012 19:47:35 +0000 (UTC) References: <539014DCC0014797A06A19B33FA7B852@JackKrupansky> User-Agent: K-9 Mail for Android In-Reply-To: <539014DCC0014797A06A19B33FA7B852@JackKrupansky> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----YGZP5DJQ6HVELHGYBMID2NTAHIIHMH" Subject: Re: What is the maximum document number? From: Uwe Schindler Date: Sun, 03 Jun 2012 21:47:32 +0200 To: dev@lucene.apache.org Message-ID: ------YGZP5DJQ6HVELHGYBMID2NTAHIIHMH Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, In fact maxDoc is not the maximum, it is also a count. If no deletions are in an index, maxDoc==numDocs. That's unfortunately how it is, maybe we should rename that in 4.0. Uwe -- Uwe Schindler H.-H.-Meier-Allee 63, 28213 Bremen http://www.thetaphi.de Jack Krupansky schrieb: Doing a little more research on document numbers, I had thought that the maximum document number was 2^30-1 or Integer.MAX_INT, but... I see that IndexReader.numDocs, maxDoc, and the corresponding IndexWriter methods return the number of documents as an int, so since document numbers start at zero, the number of documents is actually limited to 2^30-1, so the highest document number is limited to 2^30-1 minus another 1 or 2^30-2. -- Jack Krupansky ------YGZP5DJQ6HVELHGYBMID2NTAHIIHMH Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Hi,

In fact maxDoc is not the maximum, it is also a count. If no deletions are in an index, maxDoc==numDocs. That's unfortunately how it is, maybe we should rename that in 4.0.

Uwe
--
Uwe Schindler
H.-H.-Meier-Allee 63, 28213 Bremen
http://www.thetaphi.de



Jack Krupansky <jack@basetechnology.com> schrieb:
Doing a little more research on document numbers, I had thought that the maximum document number was 2^30-1 or Integer.MAX_INT, but... I see that IndexReader.numDocs, maxDoc, and the corresponding IndexWriter methods return the number of documents as an int, so since document numbers start at zero, the number of documents is actually limited to 2^30-1, so the highest document number is limited to 2^30-1 minus another 1 or 2^30-2.

-- Jack Krupansky
------YGZP5DJQ6HVELHGYBMID2NTAHIIHMH--