别名时更新ElasticSearch interval_refresh [英] Updating ElasticSearch interval_refresh when aliased
问题描述
现在我有3个索引
- 棒球a
- baseball-b
- 棒球-c
它们是棒球的弹性别名,并且刷新间隔为"-1",我可以通过检查
GET /baseball/_settings
They are aliased in elastic to baseball and have a refresh interval of "-1" I can check this by checking
GET /baseball/_settings
现在,如果我用
PUT /baseball-a/baseball/_settings
{
"index" : { "refresh_interval" : "1s"}
}
PUT /baseball-a/baseball/_settings
{
"index" : { "refresh_interval" : "1s"}
}
然后我就
GET /baseball/_settings
这些更改不会反映出来,但是如果我这样做
the changes are not reflected but if I do
GET /baseball-a/baseball/_settings
然后有更改
为什么别名不接收更改? (我在做什么错了
How come the alias is not picking up the changes? (what am I doing wrong)
推荐答案
您在PUT请求中使用的URL不正确,您需要将索引(即baseball-a
)和别名(即
The URL you're using in your PUT request is not correct, you need to separate the index (i.e. baseball-a
) and the alias (i.e. baseball
) with a comma, not with a forward slash.
PUT /baseball-a,baseball/_settings
{
"index" : { "refresh_interval" : "1s"}
}
此外,由于您使用的是别名,因此无需指定索引名称
Also, since you're using the alias, you don't need to specify the index name
PUT /baseball/_settings
{
"index" : { "refresh_interval" : "1s"}
}
这篇关于别名时更新ElasticSearch interval_refresh的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!