Mailing List Archive

IndexWriter thread safety
Is IndexWriter.addDocument() thread safe? I'm indexing a large number of
XML files and I have multiple threads parsing the files to create
Documents which are then added to the index writer. I took a quick look
at the source code and it looks like addDocument() is thread safe
(synchronized when adding the segment). I just wanted to make sure that
I am approaching this correctly. Is there a better approach for high
performance indexing of XML files?

Any feedback greatly appreciated.

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: IndexWriter thread safety [ In reply to ]
> From: Paul Dlug [mailto:paul@aps.org]
>
> Is IndexWriter.addDocument() thread safe?

Yes.

Doug

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