HibernateSearch 版本 5.7.1.Final 抱怨 ElasticSearch 黄色索引状态
Version 5.7.1.Final of HibernateSearch complains about ElasticSearch yellow index status
我尝试将 HibernateSearch 从版本 5.7.0.Alpha1
升级到版本 5.7.1.Final
,但这是不可能的。 运行 我的应用程序使用 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.
索引状态 yellow
在我的设置中是典型的(我认为)。我的整个集群状态是yellow
,因为是单机部署ElasticSearch(测试用)。所以我想阻止 HibernateSearch 等待 green
状态并强制它接受 yellow
状态(以前的版本不这样做)。有没有我可以设置的设置,例如 hibernate.cfg.xml
?
我发现开发者论坛上讨论了这个问题,但没有人提到设置名称。
只需将此 属性 hibernate.search.default.elasticsearch.required_index_status
设置为 yellow
。可能的值为 green
或 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.
您可以在此找到更多信息 documentation
我尝试将 HibernateSearch 从版本 5.7.0.Alpha1
升级到版本 5.7.1.Final
,但这是不可能的。 运行 我的应用程序使用 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.
索引状态 yellow
在我的设置中是典型的(我认为)。我的整个集群状态是yellow
,因为是单机部署ElasticSearch(测试用)。所以我想阻止 HibernateSearch 等待 green
状态并强制它接受 yellow
状态(以前的版本不这样做)。有没有我可以设置的设置,例如 hibernate.cfg.xml
?
我发现开发者论坛上讨论了这个问题,但没有人提到设置名称。
只需将此 属性 hibernate.search.default.elasticsearch.required_index_status
设置为 yellow
。可能的值为 green
或 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.
您可以在此找到更多信息 documentation