Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 45952 invoked from network); 21 Nov 2009 01:28:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Nov 2009 01:28:24 -0000 Received: (qmail 31655 invoked by uid 500); 21 Nov 2009 01:28:22 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 31566 invoked by uid 500); 21 Nov 2009 01:28:22 -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 31556 invoked by uid 99); 21 Nov 2009 01:28:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Nov 2009 01:28:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fabriciorsf@gmail.com designates 209.85.221.203 as permitted sender) Received: from [209.85.221.203] (HELO mail-qy0-f203.google.com) (209.85.221.203) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Nov 2009 01:28:14 +0000 Received: by qyk41 with SMTP id 41so2133463qyk.29 for ; Fri, 20 Nov 2009 17:27:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=9AMFk1a+qqFoK7+5/lbigUPtwOIWM78oInJt3pyL/rY=; b=UE11xTiKXCHF5/CjR/wv9fvMcOqPWIR7voy/U/3btZO+z5INsdq+k48falu7iQdRA4 EgGDASVj/84NblauXULBlaTBRNjRwdyRS5PNdqA6AzPyqxi2LqNt4m9lFqyKfWA5JaIY Hm7a3IY3oMt04jJmrovCAKFDgRJz/oUV7McxM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=rrX8Jxxt79Ek8k+MG8Joz+phrFd3P9MHQp8FmVJzVWUCVoIACrBjyoPOxMhDhKsV+O 8qhF2rRVSf+JPrLjHhsHlTIIxa7QE1Sw0fXICrMZNwmrN3WQ1tFNuyC+8EGB9fZIY/ym pbgoDrW/xQeP83lIXcqTImCP4fA0OuFc6bh8M= MIME-Version: 1.0 Received: by 10.229.12.212 with SMTP id y20mr320110qcy.16.1258766873223; Fri, 20 Nov 2009 17:27:53 -0800 (PST) In-Reply-To: <359a92830911201614p17e83db4obead9a068fd114a7@mail.gmail.com> References: <359a92830911201614p17e83db4obead9a068fd114a7@mail.gmail.com> Date: Fri, 20 Nov 2009 22:27:53 -0300 Message-ID: Subject: Re: Help me with this error on indexing From: =?ISO-8859-1?Q?Fabr=EDcio_Raphael?= To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=00163641860555629b0478d78004 X-Virus-Checked: Checked by ClamAV on apache.org --00163641860555629b0478d78004 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This hapened only on Windows, on Ubuntu it don't happen. And I corrected this problem by removing the commit, and put it in the end of the addition of all documents. On Fri, Nov 20, 2009 at 9:14 PM, Erick Erickson wr= ote: > What operating system are you running on? This sounds like Windows behavi= or > when some other process is holding the file open..... > > Erick > > 2009/11/20 Fabr=EDcio Raphael > > > Hi, > > > > I am evaluating several search algoritms, and I iterate on each. In eac= h > > interation I delete the index directory, index the docs and I run the > > evaluation on the algoritm. The end of the iteration I close the > > indexReader. > > > > Then, in the second iteration the following error occurs int the doc 11= 54 > > indexing: > > > > adding docs\1148 > > adding docs\1149 > > adding docs\1150 > > adding docs\1151 > > adding docs\1152 > > adding docs\1153 > > adding docs\1154 > > java.io.IOException: Cannot overwrite: index\_zk.cfs > > at > org.apache.lucene.store.FSDirectory.initOutput(FSDirectory.java:362) > > at > > > > > org.apache.lucene.store.SimpleFSDirectory.createOutput(SimpleFSDirectory.= java:58) > > at > > > > > org.apache.lucene.index.CompoundFileWriter.close(CompoundFileWriter.java:= 150) > > at > > > > > org.apache.lucene.index.DocumentsWriter.createCompoundFile(DocumentsWrite= r.java:618) > > at > > > org.apache.lucene.index.IndexWriter.doFlushInternal(IndexWriter.java:4320= ) > > at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:4174= ) > > at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:4165) > > at > > org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:4055= ) > > at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:4118) > > at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:4096) > > > > This is the code: > > > > public void addDocument(Document doc) throws CorruptIndexException, > > IOException { > > synchronized (getIndexWriter()) { > > getIndexWriter().addDocument(doc); > > getIndexWriter().commit(); > > } > > } > > > > > > Can any help me? > > > > Now Thanks! > > > > -- > > Fabr=EDcio Raphael Silva Ferreira > > > --=20 Fabr=EDcio Raphael --00163641860555629b0478d78004--