https://www.elastic.co/blog/changing-mapping-with-zero-downtime/ElasticSearch - 零停机
重建索引数据我尝试创建一个新的指标,零停机本指南重新索引我的数据。
现在我已经称为索引“photoshooter”我按照步骤
1)用新的映射创建新的索引“photoshooter_v1” ......(完成)
2)创建别名...
卷曲-XPOST本地主机:9200/_aliases -d“
{
"actions": [
{ "add": {
"alias": "photoshooter",
"index": "photoshooter_v1"
}}
]
}
,我得到这个错误...
{
"error": "InvalidAliasNameException[[photoshooter_v1] Invalid alias name [photoshooter], an index exists with the same name as the alias]",
"status": 400
}
我觉得我失去的东西与逻辑..
你有没有做到这一点? ES文档从来没有提到你正在尝试做什么是不可能的,但是他们的例子明确地将别名添加到多个索引中作为单个操作的一部分。 – tishma
嘿,我没有正确阅读错误信息:)我明白,它不会让你应用相同的别名超过1索引。 – tishma