Because of the way indexes are implemented in 3.x - all nodes are indexed as part of the *same* Lucene document, this approach will not be ideal because of lock contention.
The recommended approach is for each process in the cluster to have its own copy of the indexes.
Thanks for the answer. Do you have any suggestions for keeping indexes in sync when Modeshape instances leave/join for maintenace and return, while in the mean time nodes have been added?
I join the question of Wessel. Is there any way to index only documents that were received from the cluster once the node joins?
Is there any way to index only documents that were received from the cluster once the node joins?
Once a node joins the cluster, it will get updates from that point onward, but I assume you're asking if it's possible to get the "delta" information i.e. - only the data which has changed since the node was last seen alive.
ModeShape 3.x does not have a mechanism for doing this by itself. One thing you can try is to look at configuring Hibernate Search in JMS master/slave mode (3.5. JMS Master/Slave configuration and https://github.com/ModeShape/quickstart/tree/3.x/modeshape-clustering)
We've only done a very basic test with this (since it's highly complicated to get the configuration working) but if you're interested you could investigate some more.