Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 76775 invoked from network); 17 Feb 2006 18:51:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Feb 2006 18:51:29 -0000 Received: (qmail 33064 invoked by uid 500); 17 Feb 2006 18:51:19 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 33000 invoked by uid 500); 17 Feb 2006 18:51:18 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 32952 invoked by uid 99); 17 Feb 2006 18:51:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2006 10:51:18 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of daniel.armbrust.list@gmail.com designates 64.233.162.206 as permitted sender) Received: from [64.233.162.206] (HELO zproxy.gmail.com) (64.233.162.206) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2006 10:51:15 -0800 Received: by zproxy.gmail.com with SMTP id f1so469246nzc for ; Fri, 17 Feb 2006 10:50:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=JMDDrfOZukKBzYdliwXJEV03E58wr65WwFQZm2ld/PO2GQ3iJHfkM0WKOJbJRwSDxH54oHop66NFsreKIAxe/gDFxc+YOCK3S1wJmv/udyejfQpTBeQ55vIbMeO/8g+Ts9VdEkCPHZ8U2Eq8sxZ0nsuF5aX/77on1z6MDbJ6ioM= Received: by 10.36.251.4 with SMTP id y4mr2505490nzh; Fri, 17 Feb 2006 10:50:54 -0800 (PST) Received: from ?172.22.19.82? ( [129.176.197.15]) by mx.gmail.com with ESMTP id c12sm3238446nzc.2006.02.17.10.50.54; Fri, 17 Feb 2006 10:50:54 -0800 (PST) Message-ID: <43F61B0D.30608@gmail.com> Date: Fri, 17 Feb 2006 12:50:53 -0600 From: Dan Armbrust User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: Re: 1.9 RC1 References: <20060217182823.94795.qmail@web50302.mail.yahoo.com> In-Reply-To: <20060217182823.94795.qmail@web50302.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I'd like to see this improvement request implemented - but I'm not sure if 1.9 or 2.0 would be a better place to do it: http://issues.apache.org/jira/browse/LUCENE-301 Short summary - The Constructor for IndexWriter currently will only create an index in a folder if you set the boolean create flag to true. But then, if you want to append to that index, you have to set the create flag to false (otherwise it overwrites) In my use cases, I seldom want to overwrite an index - but I often create new ones, and append to existing ones. Forgetting to switch the boolean flag between the initial create and the append causes data loss. To me, a better, safer API would be to change the parameter named "create" into "clear" - and then change the behavior so that is always creates a new index at the specified location if one doesn't already exist. If clear is false - it would append (same as current behavior) - and if clear is true is would clear first, and then create a new index. So nobody using the API should break. Dan -- **************************** Daniel Armbrust Biomedical Informatics Mayo Clinic Rochester daniel.armbrust(at)mayo.edu http://informatics.mayo.edu/ --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org