lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramanathan Krishnan <>
Subject Re: "Best-practice" in a web application AND live update of index used by Tomcat
Date Tue, 20 Sep 2005 23:22:51 GMT
I am a newbie to lucene but I guess the IOException will occur only in 
windows as window os doesn't close the files properly.  It shud work 
fine in Linux.
I had a similar problem when recreating the same index. The approach I 
took was to delete all documents and start adding new ones, instead of 
overwriting the index.


Matthias Bräuer wrote:

> 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:
> For additional commands, e-mail:

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

View raw message