You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Alex Kiselevski <AL...@Amdocs.com> on 2005/09/27 15:02:23 UTC
IndexWriter exception
Hi,
I have a strange exception when I'm trying to recreate an IndexWriter,
that was previously defined.
I did the following steps:
1. mWriter = new IndexWriter(indexPath, analyzer, true);
2. mWriter.addDocument(document);
3. mWriter.optimize();
4. mWriter.close();
In the next step I try to recreate the indexWriter by the same way I did
it in the first step
5. mWriter = new IndexWriter(indexPath, analyzer, true);
And I got an Exception:
java.io.IOException: Cannot delete _a.cfs
at
org.apache.lucene.store.FSDirectory.create(FSDirectory.java:144)
at
org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:105)
at
org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:83)
at
org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:173)
at
com.stp.core.cv.index.AbstractIndexer.<init>(AbstractIndexer.java:28)
at com.stp.core.cv.index.CVIndexer.<init>(CVIndexer.java:27)
at com.stp.core.CVFacade.indexDocuments(CVFacade.java:102)
at
com.stp.test.STPTestUtility.indexDocuments(STPTestUtility.java:129)
at
com.stp.test.STPStorePanel$IndexThread.run(STPStorePanel.java:649)
Alex Kiselevski
Solution Engineer Pre Sales
+9.729.776.7086 (desk)
+9.729.776.1504 (fax)
AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.
Re: IndexWriter exception
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Alex,
Can you write your code as a unit test that we can run and see the
error? Are you running this on Windows?
Otis
--- Alex Kiselevski <AL...@Amdocs.com> wrote:
>
> Hi,
>
> I have a strange exception when I'm trying to recreate an
> IndexWriter,
> that was previously defined.
>
>
>
> I did the following steps:
>
> 1. mWriter = new IndexWriter(indexPath, analyzer, true);
> 2. mWriter.addDocument(document);
> 3. mWriter.optimize();
> 4. mWriter.close();
>
>
>
> In the next step I try to recreate the indexWriter by the same way I
> did
> it in the first step
>
> 5. mWriter = new IndexWriter(indexPath, analyzer, true);
>
> And I got an Exception:
>
>
>
> java.io.IOException: Cannot delete _a.cfs
>
>
>
> at
> org.apache.lucene.store.FSDirectory.create(FSDirectory.java:144)
>
>
>
> at
>
org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:105)
>
>
>
> at
> org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:83)
>
>
>
> at
> org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:173)
>
>
>
> at
> com.stp.core.cv.index.AbstractIndexer.<init>(AbstractIndexer.java:28)
>
>
>
> at
> com.stp.core.cv.index.CVIndexer.<init>(CVIndexer.java:27)
>
>
>
> at
> com.stp.core.CVFacade.indexDocuments(CVFacade.java:102)
>
>
>
> at
> com.stp.test.STPTestUtility.indexDocuments(STPTestUtility.java:129)
>
>
>
> at
> com.stp.test.STPStorePanel$IndexThread.run(STPStorePanel.java:649)
>
>
>
>
>
>
>
> Alex Kiselevski
>
> Solution Engineer Pre Sales
>
> +9.729.776.7086 (desk)
> +9.729.776.1504 (fax)
>
> AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
>
>
>
>
>
>
>
> The information contained in this message is proprietary of Amdocs,
> protected from disclosure, and may be privileged.
> The information is intended to be conveyed only to the designated
> recipient(s)
> of the message. If the reader of this message is not the intended
> recipient,
> you are hereby notified that any dissemination, use, distribution or
> copying of
> this communication is strictly prohibited and may be unlawful.
> If you have received this communication in error, please notify us
> immediately
> by replying to the message and deleting it from your computer.
> Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org