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 5F5C6104BF for ; Fri, 25 Jul 2014 17:00:43 +0000 (UTC) Received: (qmail 74866 invoked by uid 500); 25 Jul 2014 17:00:42 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 74793 invoked by uid 500); 25 Jul 2014 17:00:42 -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 74782 invoked by uid 99); 25 Jul 2014 17:00:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2014 17:00:42 +0000 Date: Fri, 25 Jul 2014 17:00:42 +0000 (UTC) From: "Shai Erera (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-5843) IndexWriter should refuse to create an index with more than INT_MAX docs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-5843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14074575#comment-14074575 ] Shai Erera commented on LUCENE-5843: ------------------------------------ oh good, I didn't read the patch before, but I see you even explain why we don't use the constant from ArrayUtil! +1 > IndexWriter should refuse to create an index with more than INT_MAX docs > ------------------------------------------------------------------------ > > Key: LUCENE-5843 > URL: https://issues.apache.org/jira/browse/LUCENE-5843 > Project: Lucene - Core > Issue Type: Bug > Components: core/index > Reporter: Michael McCandless > Assignee: Michael McCandless > Fix For: 5.0, 4.10 > > Attachments: LUCENE-5843.patch > > > It's more and more common for users these days to create very large indices, e.g. indexing lines from log files, or packets on a network, etc., and it's not hard to accidentally exceed the maximum number of documents in one index. > I think the limit is actually Integer.MAX_VALUE-1 docs, because we use that value as a sentinel during searching. > I'm not sure what IW does today if you create a too-big index but it's probably horrible; it may succeed and then at search time you hit nasty exceptions when we overflow int. > I think it should throw an IndexFullException instead. It'd be nice if we could do this on the very doc that when added would go over the limit, but I would also settle for just throwing at flush as well ... i.e. I think what's really important is that the index does not become unusable. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org