elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.19k stars 24.85k forks source link

Provide a mechanism for allowing indexing when versions mismatch #2265

Closed snellm closed 10 years ago

snellm commented 12 years ago

When using versioning, there is currently no way to force a document to be indexed when the same or newer version already exists. This would be useful when, for instance, ElasticSearch contains data replicated from RDMS, and there has been a transaction rollback.

One option would be a mode in which ElasticSearch does index the older document, but still returns the VersionConflictEngineException as a warning to the user.

See also https://github.com/elasticsearch/elasticsearch/issues/2166

clintongormley commented 10 years ago

The new force version type allows you to override versions in Elasticsearch. http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index_.html#_version_types