Thanks for the reply.  

Just to clarify:
You are saying that I can optimize and add a document at the same time
as long as both threads use the same IndexWriter.  Is that correct?

-----Original Message-----
From: Doug Cutting [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 2:27 PM
To: Lucene Users List
Subject: Re: Safe to write while optimizing?


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to