lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David K <>
Subject Multiple instances of Lucene IndexWriter
Date Fri, 12 Oct 2007 10:26:33 GMT

We are currently evaluating Lucene for document indexing and a question came
up regarding multiple instances of IndexWriter possibly accessing the same
index (directory).

This would be a consequence of multiple instances of our application
possibly accessing the same index. Where multiple instances are used for
load balancing and fail over of the application.

The index could be either on a local drive when virtualization is used to
achieve multiple instances on a single box. The index could also be on a
shared drive (windows file sharing) and multiple server instances trying to
update it.

I have been looking around in the forums and it is always advised against
multiple instances of IndexWriter  writing to the same index but I was
wondering whether the group has any suggestions for workarounds. Surely
there must be other load balanced applications using Lucene?

Some the workarounds I can think of OTTOMH:

1. each instance writing to a local index and merge these local indexes
periodically to a shared index where searching is performed

2. implement our own queuing algorithms by testing for write locks and wait
until locks are cleared

thank you,
View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message