Re: Closing indexsearcher , making sur eit is in use

2011-01-13 Thread Umesh Prasad
You can use ReadWriteLock as low level technique to manage access. A ReadWriteLock maintains a pair of associated locks

Re: Closing indexsearcher , making sur eit is in use

2011-01-13 Thread Ian Lea
Use something with reference counting - Lucene in action second edition has a searcher manager class which I think might be available standalone. Or a couple of low-tech alternatives: instead of closing the old searcher, move it out of the way and keep a reference to it and close it after n secon