[英]Hibernate Search 6.0.2.Final with opendistro
I have a Spring Boot 2.4.2
application integrated with Hibernate Search 6.0.2.Final
我有一个Spring Boot 2.4.2
应用程序与Hibernate Search 6.0.2.Final
集成
When using standard elasticsearch
everything works fine (read/write) on persisting new entities.使用标准elasticsearch
时,在持久化新实体上一切正常(读/写)。 The index also gets created as expected myindex-000001
based on the default simple
index strategy.索引也会根据默认的simple
索引策略按预期创建myindex-000001
。
However, when I switched the backend to opendistro
(latest) I only see a single index created by the name myindex-write
(different that the expected myindex-000001
).但是,当我将后端切换到opendistro
(最新)时,我只看到一个由名称myindex-write
创建的索引(与预期的myindex-000001
不同)。 The write operations work fine as expected (due to the suffix -write
), however the read operations fail with the error:写入操作按预期工作(由于后缀-write
),但是读取操作失败并出现错误:
root_cause": [
{
"type": "index_not_found_exception",
"reason": "no such index [myindex-read]",
"resource.type": "index_or_alias",
"resource.id": "myindex-read",
"index_uuid": "_na_",
"index": "myindex-read"
}
]
GET /_cat/aliases
on opendistro
show that there are no aliases for the index. opendistro 上的GET /_cat/aliases
opendistro
索引没有别名。
What is the best possible way to resolve this?解决此问题的最佳方法是什么? no-alias
strategy shown here ? 这里显示no-alias
策略? The downside of using no-alias
is the lack of blue-green deployment like re-indexing.使用no-alias
的缺点是缺乏像重新索引这样的蓝绿色部署。 Is custom
index strategy the best way to solve this? custom
索引策略是解决这个问题的最佳方法吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.