我看到有关弹性搜索1.2.0(最近从1.0.1升级)的ID的奇怪行为.
搜索检索我的文档,显示_id的正确值:
[终奌站]
curl 'myServer:9200/global/_search?q=someField:something
Run Code Online (Sandbox Code Playgroud)
结果是
{
"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",
...
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
但直接查找id不会:
[terminal]
curl 'myServer:9200/global/user/7a113e4f-44de-3b2b-a3f1-fb881da1b00a'
Run Code Online (Sandbox Code Playgroud)
结果是
{
"_index": "global",
"_type": "user",
"_id": "7a113e4f-44de-3b2b-a3f1-fb881da1b00a",
"found": false
}
Run Code Online (Sandbox Code Playgroud)
这似乎是在以前使用自定义脚本更新的文档上.
有任何想法吗?