have a look at spring module 0.3. it has a lucene module which contains many interesting classes LuceneIndexTemplate, LuceneSearchTemplate, and all kind of factotires following spring concepts. here is the url to the documentation: http://www.springframework.org/node/270
-----Original Message----- From: Mike Streeton [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 06, 2006 4:02 AM To: java-user@lucene.apache.org Subject: RE: spring & lucene 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 www.ardentia.com the home of NetSearch -----Original Message----- From: Rajiv Roopan [mailto:[EMAIL PROTECTED] Sent: 06 June 2006 05:28 To: java-user@lucene.apache.org Subject: spring & lucene Hello, I'm using the spring framework to define my indexsearcher and indexwriter. They are defined as persistent singletons in the application. 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? Thanks! rajiv --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]