OpenSearch/docs
Boaz Leskes 9f10547f4b Allow 0 as a valid external version
Until now all version types have officially required the version to be a positive long number. Despite of this has being documented, ES versions <=1.0 did not enforce it when using the `external` version type. As a result people have succesfully indexed documents with 0 as a version. In 1.1. we introduced validation checks on incoming version values and causing indexing request to fail if the version was set to 0. While this is strictly speaking OK, we effectively have a situation where data already indexed does not match the version invariant.

To be lenient and adhere to spirit of our data backward compatibility policy, we have decided to allow 0 as a valid external version type. This is somewhat complicated as 0 is also the internal value of `MATCH_ANY`, which indicates requests should succeed regardles off the current doc version. To keep things simple, this commit changes the internal value of `MATCH_ANY` to `-3` for all version types.

Since we're doing this in a minor release (and because versions are stored in the transaction log), the default `internal` version type still accepts 0 as a `MATCH_ANY` value. This is not a problem for other version types as `MATCH_ANY` doesn't make sense in that context.

Closes #5662
2014-05-16 22:10:16 +02:00
..
community Renamed "tire" to "retire" in community clients 2014-05-14 12:19:45 +02:00
groovy-api Updated groovy docs to point to the new groovy repo 2014-05-14 12:08:02 +02:00
java-api [DOCS] Update client.asciidoc 2014-05-06 10:28:13 +02:00
javascript
perl
python
reference Allow 0 as a valid external version 2014-05-16 22:10:16 +02:00
river
ruby
README.md

README.md

The Elasticsearch docs are in AsciiDoc format and can be built using the Elasticsearch documentation build process

See: https://github.com/elasticsearch/docs