【发布时间】:2016-08-29 11:47:47
【问题描述】:
我创建了两个测试索引和一个与之关联的别名:
POST /_aliases
{
"actions" : [
{
"add" : {
"index" : "test",
"alias" : "alias_test",
"index_routing" : "1"
}
},
{
"add" : {
"index" : "test2",
"alias" : "alias_test"
}
}
]
}
但是,当我尝试使用 routing=1 将文档索引到 test 索引时,它仍然抛出错误:
POST alias_test/test/test?routing=1
{
"user" : "kimchy",
"post_date" : "2009-11-15T14:12:12",
"message" : "trying out Elasticsearch"
}
错误信息:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Alias [alias_test] has more than one indices associated with it [[test2, test]], can't execute a single index op"
}
],
"type": "illegal_argument_exception",
"reason": "Alias [alias_test] has more than one indices associated with it [[test2, test]], can't execute a single index op"
},
"status": 400
}
有什么建议吗?
【问题讨论】:
标签: elasticsearch