美文网首页ELK漫漫之路
elasticsearch 索引别名

elasticsearch 索引别名

作者: 续哥儿 | 来源:发表于2018-08-28 22:22 被阅读0次

查看别名get /xx-index/_aliases
1对1 添加

post /_aliases
{
"actions": [
{"add" : { "index" : "xx-2018-08-08", "alias": "xxxxxx"} }
]
}

1对1 移除

post /_aliases
{
"actions": [
{"remove" : { "index" : "xx-2018-08-08", "alias": "xxxxxx"} }
]
}

多对1(同样支持通配符)

post /_aliases
{
"actions": [
{"add" : { "indices" : ["xx-2018-08-08","xx-2018-08-09"], "alias": "xxxxxx"} }
]
}

移除跟1对1移除一样
这里有个注意点 搜索文档的时候,多对1无法搜索会报错

相关文章

网友评论

    本文标题:elasticsearch 索引别名

    本文链接:https://www.haomeiwen.com/subject/qglcwftx.html