tags:

views:

32

answers:

1

What is the best way to allow multiple processess to modify a lucene.NEt index without locking or conflicts?

What is the code used to add "locking" to directories so that multiple sources can modify/search the index with no interferance?

I would like to make it as resilient as possible.

Thanks, Eli

A: 

Lucene does not allow multiple processes to modify an index simulatneously. If you have multiple processes that want to modify a lucene index, your options are:

  1. Implement a server that modifies the index and serves requests from other processes.
  2. Use Solr to do the above.
  3. Write the modifications to a queue, and run a batch process to read the queue and modify the index.
KenE