We integrated hibernate search into our crud microservices (simple spring boot apps) and it works like a charm. One fact that makes our architects nervous is that the crud services refuse to start when Elasticsearch is not running.
Is there any way to tell hibernate search that it should ignore the Elasticsearch cluster status?
You can have Hibernate Search start without trying to reach Elasticsearch, and it's documented: https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#backend-elasticsearch-configuration-version
In short, set these properties:
hibernate.search.backend.version_check.enabled = false
hibernate.search.backend.version = 7.17
hibernate.search.schema_management.strategy = none
The downsides are:
EDIT: You can also address the third item (the fact that indexing will fail if Elasticsearch is down) by using the outbox-polling
coordination strategy, which will record indexing events in the database and process them in the background instead of indexing directly. Indexing will still fail when Elasticsearch is in progress, but it will fail in some background process instead of the main application threads, and you will be able to have events reprocessed once Elasticsearch is back up.