elasticsearch/elasticsearch — pull request #3104 by jpountz (2013-05-28 13:55:44+00:00)
Title: Store _version as a numeric doc values field.

Doc values can be expected to be more compact than payloads and should provide
better flexibility since doc values formats can be picked on a per-field basis.
This patch:
- makes _version stored as a numeric doc values field,
- manages backwards compatibility: if a version is not found in doc values,
then it will look into payloads,
- uses background merges to upgrade old segments and move _version from
payloads to doc values.

Closes #3103