ElasticSearch external version control

#外部版本控制机制|
PUT /library/books/1?version=5&version_type=external
{
  "title": "Elosticsearch: The Definitive Guide" ,
  "name":{
    "first" : "Zachary",
    "last" : "Tong"
  },
  "publish_date":"*2015-02-06*" ,
  "price" :"20"
}
  
PUT /library/books/1?version=6&version_type=external
{
  "title": "Elasticsearch: The Definitive Guide" ,
  "name" :{
    "first" : "Zachary",
    "last" : "Tong"
  },
  "publish_date":"*2015-02-06*" ,
  "price":"25"
}

Here estimated that some people will not understand, on a blog is not about self-growth version of it? And on a version number is 3, how can the version set to 5, this is the external version control, specified by a custom version control, this parameter version_type = external version control of their own

But when we perform again this operation will be incorrect report, the current version 5, version 5 also provides a version conflict

The external version control, checks the provided version is not higher than the current version, will be equal to or less than the failure, for example, provide version 6, 50, 100 will do, okay try to know

 

 

 

Verify the external version control from the results, provide version than the current version can be

 

Published 298 original articles · won praise 107 · Views 140,000 +

Guess you like

Origin blog.csdn.net/ywl470812087/article/details/104761710