What is the best way to allow multiple processess to modify a lucene
-
06-07-2019 - |
Question
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
Solution
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:
- Implement a server that modifies the index and serves requests from other processes.
- Use Solr to do the above.
- Write the modifications to a queue, and run a batch process to read the queue and modify the index.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow