http://192.168.32.81:9200/library/books/8/
GET
{
"_index": "library",
"_type": "books",
"_id": "8",
"_version": 1,
"found": true,
"_source": {
"titile": "Elasticsearch: The Defintive Guide",
"name": {
"first": "Zachary",
"last": "Tong"
},
"publish_date": "2016-07-29",
"price": "90.01"
}
}
此时版本为 "_version": 1,
http://192.168.32.81:9200/library/books/8/
_update POST
{
"doc":{
"price":"11.13"}
}
{
"_index": "library",
"_type": "books",
"_id": "8",
"_version": 2,
"found": true,
"_source": {
"titile": "Elasticsearch: The Defintive Guide",
"name": {
"first": "Zachary",
"last": "Tong"
},
"publish_date": "2016-07-29",
"price": "11.13"
}
}
此时版本变为2