elasticsearchoptimistic-locking

ElasticSearch versioning backward compatibility


We have to migrate a system where we currently have many ElasticSearch indexes with custom versioning activated, and we are evaluating re-implementing the engine that indexes the data but without using custom versioning since the information travels in order.

The specific question is: Can I index a new version of a document in ElasticSearch, without passing the '_version' field in the request, over an index that already has the same document ID previously indexed but with versioning?

Thanks in advance.


Solution

  • yes you can, Elasticsearch will auto increment the version by +1 for you