elasticsearch带路由删除
匿名 | 发布于2017年12月29日 | 阅读数:2419
今天测试代码,发现 我的文档带着路由的时候,删除带不带路由都失败
GET /tk_appsearch_good_1/ty_good/943749480862326784_37?routing=37 这样得到文档,
DELETE /alia_appsearch_good_1/ty_good/943749480862326784_37?routing=37
提示没找到
求解
GET /tk_appsearch_good_1/ty_good/943749480862326784_37?routing=37 这样得到文档,
"_id": "943749480862326784_37",
"_version": 1,
"_routing": "37",
"found": true,
再删除这个文档:DELETE /alia_appsearch_good_1/ty_good/943749480862326784_37?routing=37
提示没找到
{
"found": false,
"_index": "tk_appsearch_good_1-20171223",
"_type": "ty_good",
"_id": "943749480862326784_37",
"_version": 1,
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
}
}
求解
1 个回复
kennywu76 - Wood
赞同来自: code4j