If you want to spend a few bucks, here's part of a reply to a similar question from Mike McCandless a day or so ago....
<<< You can get the book here http://www.manning.com/hatcher3 (NOTE: I'm one of the authors!). Chapter 11 in the book has a class called SearcherManager, that handles the details of reopen/closing the IndexReader while queries are still in flight, that might be useful here. >>> The book is Lucene In Action II. Manning has an "early access program" (MEAP) that lets you get a PDF version. That class is considerably more extensive and handles the edge cases as I remember it.... Best Erick On Wed, Nov 11, 2009 at 5:41 PM, Jacob Rhoden <jrho...@unimelb.edu.au>wrote: > I knew I would have overlooked something, thanks for the help! > > On 12/11/2009, at 9:21 AM, Uwe Schindler wrote: > > ....simply do not catch and rethrow the IOException, instead put release >> in a >> >> finally block and let the IOException automatically go upwards. >> >> this.retain(); >>> try { >>> TopDocs result = searcher.search(query, limit); >>> return result; >>> } finally { >>> this.release(); >>> } >>> >> >> Less code more secure and effective :-) >> > > > ____________________________________ > Information Technology Services, > The University of Melbourne > > Email: jrho...@unimelb.edu.au > Phone: +61 3 8344 2884 > Mobile: +61 4 1095 7575 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >