我儘量做到批量更新Elasticsearch 5.1批量操作
方法:郵政 網址:/客戶/外部/ _bulk
Json的身體:
{"index":{"_id":"1"}}
{"name": "John Doe" }
{"index":{"_id":"2"}}
{"name": "Jane Doe" }
Id 1已更新,但id 2未更新。我不知道爲什麼?
響應是在這裏:
{
"took": 138,
"errors": false,
"items": [
{
"index": {
"_index": "customer",
"_type": "external",
"_id": "1",
"_version": 15,
"result": "updated",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"created": false,
"status": 200
}
}
]
}
你是否確定在第四行後添加一行? – Val