4

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.

nuoritoveri
  • 2,494
  • 1
  • 24
  • 28

1 Answers1

10

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

Dimitri
  • 8,122
  • 19
  • 71
  • 128