Version Variables
Version are exposed during build using the {{versions.VERSIONING_SCHEME}} variable.
For example stack versioning variables are exposed as {{versions.stack}}.
Besides the current version, the following suffixes are available:
| Version substitution | result | purpose |
|---|---|---|
{{version.stack}} |
9.2.0 | Current version |
{{version.stack.base}} |
9.0.0 | The first version on the new doc system |
Using specialized mutation operators versions can be printed in any kind of ways.
| Version substitution | result |
|---|---|
{{version.stack| M.M}} |
9.2 |
{{version.stack.base | M }} |
9 |
{{version.stack | M+1 | M }} |
10 |
{{version.stack.base | M.M+1 }} |
9.1.0 |
Mutation operators also work correctly in links and code blocks, making them versatile for various documentation contexts.
Mutation operators can be used in both link URLs and link text:
[Download version {{version.stack | M.M}}](https://download.elastic.co/{{version.stack | M.M}}/elasticsearch.tar.gz)
[Latest major version](https://elastic.co/guide/en/elasticsearch/reference/{{version.stack | M}}/index.html)
Which renders as:
Download version 9.2 Latest major version
Mutation operators work in enhanced code blocks when subs=true is specified:
```bash subs=true
curl -X GET "localhost:9200/_cluster/health?v&pretty"
echo "Elasticsearch {{version.stack | M.M}} is running"
```
Which renders as:
curl -X GET "localhost:9200/_cluster/health?v&pretty"
echo "Elasticsearch 9.2 is running"
Mutation operators are robust and handle whitespace around the pipe character correctly:
| Syntax | Result | Notes |
|---|---|---|
{{version.stack|M.M}} |
9.2 | No spaces |
{{version.stack | M.M}} |
9.2 | Spaces around pipe |
{{version.stack |M.M}} |
9.2 | Space before pipe |
{{version.stack| M.M}} |
9.2 | Space after pipe |
This is dictated by the versions.yml configuration file
stackeceecheckessesfsearch_uiselfecctlcuratorsecurityapm_agent_androidapm_agent_iosapm_agent_dotnetapm_agent_goapm_agent_javaapm_agent_nodeapm_agent_phpapm_agent_pythonapm_agent_rubyapm_agent_rumedot_iosedot_androidedot_dotnetedot_javaedot_nodeedot_phpedot_pythonedot_cf_awsedot_cf_azureedot_collectorapm_attacherapm_lambdaecs_logging_dotnetecs_logging_go_logrusecs_logging_go_zapecs_logging_go_zerologecs_logging_javaecs_logging_nodejsecs_logging_phpecs_logging_pythonecs_logging_ruby
The following are available but should not be used. These map to serverless projects and have a fixed high version number.
allechess(This is deprectated but was added for backwards-compatibility.)serverlesselasticsearchobservability