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 童小军 <to...@yikey.com> on 2007/05/25 07:57:03 UTC

How Can I let my many application can Know the Index change,but Not need re-open Index.

	I have some application will indexing new data to one Index Directory. And other some application will read the index and Data Mining.
But my Mining Application must re-open the index Directory. The Index file have 5G . and must real time mining .
How Can I do it at many computer at one network ? 
	If I must do it ,my mining application must Automatic reopen index ? I want let all application share use one IndexReader or Directory instance. Can I use RMI or ICE ?

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


Re: How Can I let my many application can Know the Index change,but Not need re-open Index.

Posted by Stephen Gray <St...@anu.edu.au>.
Hi,

My understanding is that once you have added documents to your index you
need to close and reopen your IndexReader and Searcher, otherwise the
documents added will not be available to these.

You might want to try LuceneIndexAccessor
(http://www.blizzy.de/lucene/lucene-indexaccess-0.1.0.zip) which is very
good - this caches a single copy of IndexWriter, IndexReader and
Searcher, and hands out references to your application. Once the index
is changed with IndexWriter, and the reference to IndexWriter is
released, it automatically closes and re-opens the IndexReader and
Searcher for you.

Regards,
Steve

童小军 wrote:
> 	I have some application will indexing new data to one Index Directory. And other some application will read the index and Data Mining.
> But my Mining Application must re-open the index Directory. The Index file have 5G . and must real time mining .
> How Can I do it at many computer at one network ? 
> 	If I must do it ,my mining application must Automatic reopen index ? I want let all application share use one IndexReader or Directory instance. Can I use RMI or ICE ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>   


-- 
Stephen Gray
Archive IT Officer
Australian Social Science Data Archive
18 Balmain Crescent (Building #66)
The Australian National University
Canberra ACT 0200

Phone +61 2 6125 2185
Fax +61 2 6125 0627
Web http://assda.anu.edu.au/

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