lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Streeton" <>
Subject RE: spring & lucene
Date Tue, 06 Jun 2006 08:01:47 GMT
We wrote ours for NetSearch to handle this specific issue. I suggest you
create a holder class to hold the IndexReader and IndexSearcher, this
can close them in the finalizer. Clients keep the holder until they are
finished and then discard it. When it is completely de-referenced it
will be closed. We also remove old indexes this way as well. Create a
factory class for the holder that knows when an index is being updated,
and creates new holders, when the index is not being updated it returns
the same one each time.

Mike the home of NetSearch

-----Original Message-----
From: Rajiv Roopan [] 
Sent: 06 June 2006 05:28
Subject: spring & lucene

 I'm using the spring framework to define my indexsearcher and
indexwriter.   They are defined as persistent singletons in the

I'm quite new to lucene and I realize that after updating an index
using IndexWriter you nead to re-create an instance of IndexSearcher
to search that newly updated index. I was wondering if anyone knew,
using spring, how to reload the IndexSearcher bean?


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message