lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morus Walter <>
Subject Re: Best Practices for indexing in Web application
Date Wed, 03 Mar 2004 07:42:34 GMT
Michael Steiger writes:
> I am using an IndexSearcher for querying the index but for deletions I 
> need to use the IndexReader. I now know that I can have Readers and a 
> Writer open concurrently but IndexReader.delete can only be used if no 
> Writer is open.
You should be aware that an IndexSearcher uses a readonly IndexReader.
So you can't ignore it for your considerations.
> I want to open the IndexSearcher only while searching and close it 
> afterwards.
Depends on your application, but if you can, it's better to keep IndexSearcher
open until the index changes.
Otherwise you will have to open all the index files for each search.


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

View raw message