Well, that's part of my question, sorry if it wasn't clear. I'm not explicitly closing the IndexSearcher, because there may be users still using it. Instead, I'm creating a new IndexSearcher, and leaving the old IndexSearcher to be cleaned up by the GC, as suggested here:
http://tinyurl.com/8qzo4 In the example I just sent out, the IndexSearcher is open during the incremental index, which could be the issue. Its sort of like a catch-22 right now: I can't close the old IndexSearcher until the new index is ready, and by the time the new index is ready, its too late to delete the old files. Thanks, Monsur > -----Original Message----- > From: Chuck Williams [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 28, 2005 10:09 PM > To: java-user@lucene.apache.org > Subject: Re: IndexSearcher hanging on to old index files in Windows > > Monsur Hossain writes (4/28/2005 4:44 PM): > > >Hi there. Thanks for the input. I just pulled together a > quick set of .NET > >console apps to test this out. I have an app that indexes > and an app that > >holds an open searcher. Sure enough, after each incremental > index/searcher > >refresh, I can't delete the old index files. I even tried doing a > >gc.collect(), with no luck. > > > > > I mentioned this earlier, but just to be explicit, you are > closing the > IndexSearcher before abandoning it, right? And if you opened the > IndexReader separately from the IndexSearcher, then are you > also closing > it separately? > > Chuck > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]