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, David -- View this message in context: http://www.nabble.com/Multiple-instances-of-Lucene-IndexWriter-tf4612568.html#a13172543 Sent from the Lucene - General mailing list archive at Nabble.com.
