I have tried to use the isCurrent() method IndexReader to figure out if an index is merging. but since I have to do this evrytime I need to add a document, the performance got soooo slow.
here is what I am doing, I create 4 indexs and I am running with 4 threads. I do a round robbin on the indexes when ever I process a new document. before adding a document I need to check if the index is merging, if it's the case then send this document to an index that is not merging. is there a better to index with multi threads? or what is the fastet way to check that a index is not merging? thanks for any hints, - Omar -----Original Message----- From: Yonik Seeley [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 10:03 AM To: java-user@lucene.apache.org Subject: Re: index merging On 2/6/06, Vanlerberghe, Luc <[EMAIL PROTECTED]> wrote: > Sorry to contradict you Yonik, but I'm pretty sure the commit lock is > *not* locked during a merge, only while the "segments" file is being > updated. Oops, you're right. Good thing too... if the commit lock was held during merges, one couldn't even open up a new IndexReader. -Yonik --------------------------------------------------------------------- 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]