If I use IndexReader and IndexWriter class for inserts/updates, then I need 
to handle the threading issues myself. Is there any other class (even in 
nightly build)  that I can use without having to take care of synchronization.

All this means is your code must ensure only one "writer" (IndexWriter
adding docs or IndexReader removing docs) is open at a time.  If you
fail to do so, then the second "writer" you try to create will throw a
"Lock obtain timed out" IOException.

Otherwise these classes are fully thread safe.

The performance caveat in IndexModifier (that you should batch your
deletes and batch your adds) still applies, because you will need to
open/close an IndexReader for the former and an IndexWriter for the
latter.

The Lucene in Action book does a great job describing these
concurrency rules.

Also, you should first test IndexModifier to be really sure its
performance is not sufficient for your needs.

Mike

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

Reply via email to