How to test if an IndexReader is still open?

2009-10-01 Thread Chris Bamford
Hi, In an attempt to balance searching efficiency against the number of open file descriptors on my system, I cache IndexSearchers with a "last used" timestamp. A background cache manager thread then periodically checks the cache for any that haven't been used in a while and removes them from

Re: How to test if an IndexReader is still open?

2009-10-06 Thread Chris Hostetter
: I figured it might be less expensive if search() (I have extended : IndexSearcher) were to check that the underlying IndexReader is still if you're extending IndexSearcher anyway you can override the close() method to update a boolean and then add your own isClosed() method. : open - and re