lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Kiehl <ki...@subshell.com>
Subject Re: Locks and Readers and Writers
Date Fri, 29 Oct 2004 09:20:02 GMT
Morus Walter wrote:

>>AFAIK you should never open an IndexWriter and an IndexReader at the 
>>same time. You should use only one of them at a time but you may open as 
>>many IndexSearchers as you like for searching.
> 
> You cannot open an IndexSearcher without opening an IndexReader (explicitly
> or implicitly).

I should have been more specific. The IndexReader which gets opened by 
an IndexSearcher will never have any changes to commit. So there will 
never be a problem with locks. As soon as you use an IndexReader to 
modify your index (delete doc for example) you should not have another 
IndexReader or IndexWriter open or you will probably get problems with 
the locks.

Christoph


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message