Not an answer to your question, but that could help you anyway: from what I understood in your comments, you don't really need to fully rebuild the index, you just need to source update events from a different place than the application executing the search queries.
If your "updating" application uses Hibernate ORM, you can solve the issue without fully rebuilding the index: build the index automatically and incrementally in the "updating" application (using Hibernate Search in "automatic indexing" mode without ever doing any query), and make sure the index is made available to the "searching" applicaton.
The latter can be achieved either:
- by using the experimental Elasticsearch integration and connecting both applications to the same cluster: one will update it, the other will use it to search.
- or by using the Lucene integration with the
filesystem-master
/filesystem-slave
directory providers, which will allow you to periodically (and without downtime) copy the index from the "updating" application (master) to the "searching" application (slave). Note that if multiple applications update the index, you will need to use the JMS or JGroups backend to redirect all index updates to a master node and avoid conflicts. Beware, configuring JMS or JGroups won't be obvious.