Are you sure that both processes use the same directory to store the Lock files?
If both processes are on the same machine, they will both default to the same local directory and you won't see the problem. If they are on separate machines, you should set the lock directory to some shared location (in lucene 1.4.3 by setting the system property org.apache.lucene.lockdir, in the new code by calling a setter method) It's probably because the Writer isn't aware that a Reader is using the files that it tries to delete the obsolete ones immediately. On Windows machines, the list of files that cannot be deleted immediately is stored in the file "deletable". Luc -----Original Message----- From: Matthias Bräuer [mailto:[EMAIL PROTECTED] Sent: dinsdag 20 september 2005 21:24 To: java-user@lucene.apache.org Subject: Re: "Best-practice" in a web application AND live update of index used by Tomcat Hello, I have a question regarding your answers to two previous posts: >For best performance, use a single IndexSearcher instance across your entire application. >DelayCloseIndexSearcher overrides the close() method so it does not >close immediately: it only decrements the usage counter. [...] I have implemented a Client-Server application where a desktop program on a file server regularly updates an index while a web application running on Tomcat on the same server answers queries against this index. Currently the index is not built incrementally. Now, the problem is that if I have an open IndexReader (or Searcher or Luke Toolbox, respectively), it is impossible to update the index because I get IOExceptions ala "Cannot delete _7.cfs". This even happens if the conflicting IndexReader isn't doing anything but just sitting still inside a Searcher to wait for the next query. So, does that mean I have to close the searcher after each request to let the indexer do its work? Or is there a way to tell Lucene that the IndexReader is only reading and not writing anything. Thanks for your help, Matthias --------------------------------------------------------------------- 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]