Proposal: change `observer.version` from `keyword` to `version` type
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 543
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 109
Description
The version fields produced by APM Server (like `observer.version`) is mapped as `keyword` type instead of `version` type. This makes it difficult (impossible probably) to do semver-based range queries
**What is the `version` type?**
The `version` type is a specialization of the `keyword` field:
> The field offers the same search capabilities as a regular keyword field. It can e.g. be searched for exact matches using match or term queries and supports prefix and wildcard searches. The main benefit is that range queries will honor Semver ordering, so a range query between “1.0.0” and “1.5.0" will include versions of “1.2.3” but not “1.11.2" for example
https://www.elastic.co/guide/en/elasticsearch/reference/current/version.html
**Proposal**
I suggest changing `observer.version` (and if possible other version fields) from `keyword` to `version`. The UI is not consuming `observer.version` so changing this will not have any negative impact. The UI is consuming other version fields like `agent.version` but I don't see any issue with this change either. The only limitations listed in the docs are performance related when doing certain types of searches, that we don't do:
> This field type isn’t optimized for heavy wildcard, regex or fuzzy searches. While those type of queries work in this field, you should consider using a regular keyword field if you strongly rely on these kind of queries.
Contributor guide
Assessment
This issue has not been assessed yet.