我在 elasticsearch 1.2.0(最近从 1.0.1 升级)上看到 ids 的奇怪行为。
搜索检索我的文档,显示 _id 的正确值:
[终端]
curl 'myServer:9200/global/_search?q=someField:something
结果是
{
"took": 79,
"timed_out": false,
"_shards": {
"total": 12,
"successful": 12,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 17.715034,
"hits": [
{
"_index": "global",
"_type": "user",
"_id": "7a113e4f-44de-3b2b-a3f1-fb881da1b00a",
...
}
]
}
}
但直接查找 id 不会:
[终端]
curl 'myServer:9200/global/user/7a113e4f-44de-3b2b-a3f1-fb881da1b00a'
结果是
{
"_index": "global",
"_type": "user",
"_id": "7a113e4f-44de-3b2b-a3f1-fb881da1b00a",
"found": false
}
这似乎是在之前使用自定义脚本更新的文档上。
有任何想法吗?