lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Help me with this error on indexing
Date Sat, 21 Nov 2009 00:14:19 GMT
What operating system are you running on? This sounds like Windows behavior
when some other process is holding the file open.....

Erick

2009/11/20 Fabrício Raphael <fabriciorsf@gmail.com>

> Hi,
>
> I am evaluating several search algoritms, and I iterate on each. In each
> 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 1154
> 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(DocumentsWriter.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ício Raphael Silva Ferreira
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message