9f10547f4b
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 |
||
---|---|---|
.. | ||
10_with_id.yaml | ||
15_without_id.yaml | ||
20_optype.yaml | ||
30_internal_version.yaml | ||
35_external_version.yaml | ||
36_external_gte_version.yaml | ||
37_force_version.yaml | ||
40_routing.yaml | ||
50_parent.yaml | ||
55_parent_with_routing.yaml | ||
60_refresh.yaml | ||
70_timestamp.yaml | ||
75_ttl.yaml | ||
TODO.txt |