lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Bräuer <>
Subject Re: "Best-practice" in a web application AND live update of index used by Tomcat
Date Tue, 20 Sep 2005 19:24:02 GMT

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,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message