I do understand why you need to open an indexer, my setup is similar. In regards to file handlers, gc does take care of them. On my system, I been using the logic I mentioned for the last 9 months. Since then I have switched searchers over 10 million times and the java vm is only re-initialized once a month. I did think of coding a reference count so I can close the searcher well, however leaving the whole thing to gc seems to be working fine for me.
Thanks -----Mensaje original----- De: shaoxianyang [mailto:[email protected]] Enviado el: Tuesday, September 29, 2009 8:11 PM Para: [email protected] Asunto: Re: IndexSearcher close() and search() called concurrently by different threads? BTW, just in case you ask me why I need to initialize a new IndexSearcher. Our index rebuild happen on a different directory than the existing index dir. After rebuild is done, a new IndexSearcher is created on new directory and passed into our application. -- View this message in context: http://www.nabble.com/IndexSearcher-close%28%29-and-search%28%29-called-conc urrently-by-different-threads--tp25667782p25672501.html Sent from the Lucene - General mailing list archive at Nabble.com.
