lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <>
Subject Re: index merging
Date Wed, 15 Feb 2006 22:37:02 GMT
Omar Didi wrote:
> 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?

I've done this before by having a single work queue of documents which 
need adding.  Each of the four indexing threads refer to that queue and 
can pull documents off that queue.

The concurrency utility classes in java.util.concurrent may help with 
this approach.


Daniel Noll

Nuix Australia Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia
Phone: (02) 9280 0699
Fax:   (02) 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message