Version 5.7.1.Final HibernateSearch complains about ElasticSearch yellow index status
I tried updating HibernateSearch from version 5.7.0.Alpha1
to version 5.7.1.Final
, but it is not possible. I am getting the following error when I run my application compiled with version Final
:
Exception in thread "main" org.hibernate.search.exception.SearchException:
HSEARCH400024: Timed out while waiting for for index
'com.example.app.model.journal' to reach status 'green';
status was still 'yellow' after 10000ms.
The index status is yellow
typical in my setup (I think). My whole cluster status yellow
is because this is a single machine ElasticSearch deployment (for testing purposes). So I would like to disallow HibernateSearch to wait for the status green
and force it to accept yellow
one (the previous version doesn't). Is there some kind of setting that I can set for example in hibernate.cfg.xml
?
I found this issue discussed on the developer forums, but nobody mentioned the parameter name.
source to share
Just set this property hibernate.search.default.elasticsearch.required_index_status
to yellow
. Possible values: green
or red
.
Only proceed if the index is at this level or safer. In development, set this value to yellow if the number of running nodes is lower than the number of expected replicas.
You can find more information in this documentation
source to share