Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version 5.7.1.Final of HibernateSearch complains about ElasticSearch yellow index status

I tried upgrading HibernateSearch from version 5.7.0.Alpha1 to version 5.7.1.Final, but it's not possible. I get the following error when running my application compiled with the Final version:

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 yellow is typical in my setting (I think). My whole cluster status is yellow, because it is a single-machine deployment of ElasticSearch (for test purposes). So I would like to prevent HibernateSearch from waiting for the green status and force it to accept the yellow one (the previous version does not do this). Is there some setting that I can set, for example in hibernate.cfg.xml?

I found this problem discussed on developer forums, but nobody mentioned the setting name.

like image 925
nuoritoveri Avatar asked Dec 24 '22 15:12

nuoritoveri


1 Answers

Just set this property hibernate.search.default.elasticsearch.required_index_status to yellow. Possible values are green or red.

Only operate if the index is at this level or safer. In development, set this value to yellow if the number of nodes started is below the number of expected replicas.

You can find more information in this documentation

like image 136
Dimitri Avatar answered Apr 06 '23 02:04

Dimitri