lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Crump, Michael" <mcr...@leadscope.com>
Subject RE: continuous index updates
Date Fri, 20 Aug 2004 18:51:22 GMT
So the finalizer on the underlying reader closes file handles?

-----Original Message-----
From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com] 
Sent: Friday, August 20, 2004 2:41 PM
To: Lucene Users List
Subject: Re: continuous index updates

I just create a new IndexSearcher, leave the old IndexSearcher alone,
and JVM's garbage collection cleans it up.

Otis

--- "Crump, Michael" <mcrump@leadscope.com> wrote:

> Hello,
> 
>  
> 
> I am currently working on a server app that will require the ability
> to
> make index additions/deletions at any time.  I want to cache/reuse
> index
> searchers and readers.  I know that once an index has changed only
> newly
> opened readers will see the changes.  Creating a new reader to see
> the
> changes and caching it will be no problem.  My  problem is that since
> this is a multithreaded app other threads may be using the old
> readers
> making it difficult to know when to close them.  I assume that a
> reader
> must be closed to free the associated resources.  I was thinking
> about
> using some kind of reference counted reader that would keep track of
> its
> references and only truly close when there were no references.
> 
>  
> 
> Am I making this too difficult?
> 
>  
> 
> Is there a better way?
> 
>  
> 
> I assume others have had to do this using Lucene, do you have any
> recommendations?
> 
>  
> 
> Regards,
> 
>  
> 
> Michael
> 
> 


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


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


Mime
View raw message