- concurrent update without specify version will cause update override, right?
- will Optimistic Concurrency will guranett override never happen if we use version, right?
- if 2 is true, then in code, each time to update a doc, a lock will be used before get version of a document and update it, right?
- I think you mean "overwrite" rather than "override", but yes.
- Yes.
- I'm not sure if you mean a lock in the client code or in the server code, but regardless the answer is no. Optimistic concurrency control via the version field does not require locks anywhere.
I wrote about optimistic concurrency control in Elasticsearch; whilst the examples relate to using NEST, the .NET Elasticsearch client, the overview is applicable to Elasticsearch in general.
thanks, man. it's very helpful