# 0020: Version Type Field Migration - Stage: **X (abandoned)** - Date: **2021-07-20** ## Abandoned As the time this proposal was marked `abandoned`, adopting `version` is not a priority for the ECS team or other ECS stakeholders. The team may revisit reviewing how `version` could be beneficial later on. Elasticsearch 7.10 introduced a new field data type specialized in handling software version values: `version`. The `version` type supports specialized precedence rules based on the rules outlined in [Semantic Versioning](semver.org) (semver). A `range` query against a `version` field for values between `1.0.0` and `1.5.0` will include `1.2.3` but not `1.11.2`. This differs from `keyword` fields where the `range` ordering is alphabetical. Examples: * Return documents with `.version` greater-than or equal to `1.1.0` and less-than `2.0.0` * Query across multiple versions without the need to know in advance ever possible versions in the index (e.g. `ecs.version:(1.3.0 OR 1.4.0 OR 1.5.0`) * Return all documents where minor version is 3 (`x.3.y`) or the major version is considered unstable (`0.x.y`). The purpose of this proposal is to identify which fields may be good candidates for adopting the `version` data type and design considerations for that migration. ## Fields * `agent.version` * `ecs.version` * `os.version` * `package.version` * `rule.version` * `service.version` ## Usage ## Source data ## Scope of impact ### Mapping conflicts Changing the field type will result in a mapping conflict across indices mapping version fields using `type: keyword` and indices mapping version fields as `type: version`. ## Concerns ### Version fields containing non-semantic version values Version string values that are not valid under the semver rules will still be indexed and retrieved as exact matches but will only appear _after_ any valid semver value with regular alphabetical ordering. Fields that expect version values but often contains values that do _not_ align with semver rules are probably best to remain using `keyword`. The [list](#Fields) of proposed fields will be assessed in a later stage to determine if each field's expected values make it a good candidate for `version`. ### Kibana support Support in Kibana for the `version` data for index patterns, aggregations, and Lens is still [in-progress](https://github.com/elastic/kibana/issues/93248). ## People The following are the people that consulted on the contents of this RFC. * @ebeahan | author, sponsor ## References * https://github.com/elastic/ecs/issues/887 * https://github.com/elastic/ecs/issues/842 * https://www.elastic.co/guide/en/elasticsearch/reference/current/version.html * https://github.com/elastic/kibana/issues/93248 ### RFC Pull Requests * Stage 0: https://github.com/elastic/ecs/pull/1309 * Stage X: https://github.com/elastic/ecs/pull/1451