我向ES发送以下请求:
PUT /_alias
{
"actions": [
{
"remove": {
"index": "iso27001-controls-followup-1678369933360",
"alias": "iso27001-controls-followup-current"
}
},
{
"remove": {
"index": "iso27001-controls-followup-1678452135114",
"alias": "iso27001-controls-followup-current"
}
},
{
"add": {
"index": "iso27001-controls-followup-1678455704228",
"alias": "iso27001-controls-followup-current"
}
}
]
}
上面提到的别名确实存在,我希望首先删除所有别名,然后添加一个新别名。
GET /_cat/aliases/iso27001-controls-followup-current?format=json
[
{
"alias": "iso27001-controls-followup-current",
"index": "iso27001-controls-followup-1678452135114",
"filter": "-",
"routing.index": "-",
"routing.search": "-",
"is_write_index": "-"
},
{
"alias": "iso27001-controls-followup-current",
"index": "iso27001-controls-followup-1678455704228",
"filter": "-",
"routing.index": "-",
"routing.search": "-",
"is_write_index": "-"
},
{
"alias": "iso27001-controls-followup-current",
"index": "iso27001-controls-followup-1678369933360",
"filter": "-",
"routing.index": "-",
"routing.search": "-",
"is_write_index": "-"
}
]
已正确创建新别名但未处理remove
请求。为什么?
1条答案
按热度按时间r8uurelv1#
尾巴;
我认为endpoint是
_aliases
而不是_alias
(至少在8.x
版本中是这样)。溶液
此序列在我的设置中表现正确。