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/10/06 11:26:31 UTC

IndexWriter recreating

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







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: IndexSearcher over RMI

Posted by Cyril Barlow <in...@fantasyfooty.org>.
----- Original Message ----- 
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: <ja...@lucene.apache.org>
Sent: Thursday, October 06, 2005 1:49 PM
Subject: Re: IndexSearcher over RMI


> 
> On Oct 6, 2005, at 8:45 AM, Cyril Barlow wrote:
> > I'm trying to pass an IndexSearcher over RMI but I'm getting a :
> >
> > java.rmi.UnmarshalException: error unmarshalling return; nested  
> > exception
> > is:
> >         java.io.WriteAbortedException: writing aborted;
> > java.io.NotSerializableException:  
> > org.apache.lucene.search.IndexSearcher
> >
> > Is there any way around this?
> 
> Yes - use RemoteSearchable.
> 
> Might I suggest you pick up a copy of "Lucene in Action" where most  
> of the questions you've asked recently are answered?! :)
> 
>      http://www.lucenebook.com
> 
> Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
Cool I'll have a look

	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: IndexSearcher over RMI

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Oct 6, 2005, at 8:45 AM, Cyril Barlow wrote:
> I'm trying to pass an IndexSearcher over RMI but I'm getting a :
>
> java.rmi.UnmarshalException: error unmarshalling return; nested  
> exception
> is:
>         java.io.WriteAbortedException: writing aborted;
> java.io.NotSerializableException:  
> org.apache.lucene.search.IndexSearcher
>
> Is there any way around this?

Yes - use RemoteSearchable.

Might I suggest you pick up a copy of "Lucene in Action" where most  
of the questions you've asked recently are answered?! :)

     http://www.lucenebook.com

Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


IndexSearcher over RMI

Posted by Cyril Barlow <in...@fantasyfooty.org>.
I'm trying to pass an IndexSearcher over RMI but I'm getting a :

java.rmi.UnmarshalException: error unmarshalling return; nested exception
is:
        java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: org.apache.lucene.search.IndexSearcher

Is there any way around this?


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: IndexWriter recreating

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Alex,

Please wrap this in a unit test (using JUnit) that makes it repeatable.
 When yo uhave that, please file the bug in JIRA and attach your unit
test.

Thanks,
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
> 
> 
> 
> 
> 
> 
> 
> 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