加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – 版本5.7.1.HinalnateSearchFinal抱怨ElasticSearch黄色

发布时间:2020-12-15 04:40:08 所属栏目:Java 来源:网络整理
导读:我尝试将HibernateSearch从版本5.7.0.Alpha1升级到版本5.7.1.Final,但这是不可能的.运行使用Final版本编译的应用程序时出现以下错误: Exception in thread "main" org.hibernate.search.exception.SearchException:HSEARCH400024: Timed out while waiting
我尝试将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.

索引状态黄色在我的设置中是典型的(我认为).我的整个群集状态为黄色,因为它是ElasticSearch的单机部署(用于测试目的).所以我想阻止HibernateSearch等待绿色状态并强制它接受黄色状态(之前的版本没有这样做).我可以设置一些设置,例如在hibernate.cfg.xml中吗?

我在开发者论坛上发现了这个问题,但是没有人提到设置名称.

解决方法

只需将此属性hibernate.search.default.elasticsearch.required_index_status设置为黄色即可.可能的值为绿色或红色.

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中找到更多信息

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读