As recommended, I use just one Index Searcher on my multithreaded GUI app using a singleton pattern If data is modified in the index I then close the reader and searcher, and they will be recreate on next call to getInstance() but Ive hit a problem whereby one thread was closing a searcher, another thread already the searcher open but when came to use it gave exception 'the IndexReader is closed'

I obviously dont want access to the searcher to be synchronized as it is designed to work multithreaded, so how should I close it safetly, i.e close if no current references to it.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to