lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: Safe to write while optimizing?
Date Tue, 29 Jul 2003 21:27:11 GMT
Wilton, Reece wrote:
> Three questions:
> - Is it safe to have two IndexWriters open on the same index?

No.  It is not safe, and the code makes every attempt to prohibit it.

> - Is it safe to have two IndexWriters adding a document concurrently?

No, but you can have two threads adding documents to a single 
IndexWriter concurrently.

> - Is it safe to add a document while another IndexWriter is optimizing
> the index?

No, but, so long as you use a single IndexWriter object, synchronization 
should handle things correctly so that one thread can add documents 
while another optimizes.

Doug


---------------------------------------------------------------------
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