You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/query-languages/esql/README.md
+67-4Lines changed: 67 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,16 +105,79 @@ To help differentiate between the static and generated content, the generated co
105
105
% This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
106
106
```
107
107
108
+
## Version differentiation in Docs V3
109
+
110
+
> [!IMPORTANT]
111
+
> Starting with 9.0, we no longer publish separate documentation branches for every minor release (`9.0`, `9.1`, `9.2`, etc.). This is a major departure from the practice of each minor version having its own dedicated documentation branch.
112
+
113
+
Instead, we use the [`applies_to` metadata](https://elastic.github.io/docs-builder/syntax/applies/) to differentiate features and their availability across different versions on the `main` branch.
114
+
115
+
This allows us to clearly communicate when features are introduced, when they transition from preview to GA, and which versions support specific functionality.
116
+
117
+
This metadata accepts a lifecycle and version.
118
+
119
+
### Functions and operators
120
+
121
+
Use the `@FunctionAppliesTo` annotation to specify the lifecycle and version for functions and operators.
122
+
123
+
For example, to indicate that a function is in technical preview and applies to version 9.0.0, you would use:
When a feature evolves from preview in `9.0` to GA in `9.2`, add a new entry alongside the existing preview entry and remove the `preview = true` boolean:
We updated [`DocsV3Support.java`](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/DocsV3Support.java) to generate the `applies_to` metadata correctly for functions and operators.
138
+
139
+
### Inline `applies_to` metadata
140
+
141
+
Use [inline annotations](https://elastic.github.io/docs-builder/syntax/applies/#inline-annotations) to specify `applies_to` metadata in descriptions, parameter lists, etc.
142
+
143
+
For example, the second item in this list is in technical preview as of version 9.2:
144
+
145
+
```markdown
146
+
- Item 1
147
+
- Item 2 {applies_to}`stack: preview 9.2.`
148
+
```
149
+
150
+
### Key rules
151
+
152
+
1.**Use the `preview = true` boolean** for any tech preview feature - this is required for the Kibana inline docs
153
+
-**Remove `preview = true`** only when the feature becomes GA on serverless and is _definitely_ going GA in the next minor release
154
+
2.**Never delete `appliesTo` entries** - only add new ones as features evolve from preview to GA
155
+
3.**Use specific versions** (`9.0.0`, `9.1.0`) when known, or just `PREVIEW` without a version if timing is uncertain
156
+
4.**Add `applies_to` to examples** where necessary
157
+
158
+
> [!IMPORTANT]
159
+
> We don't use `applies_to` in the legacy asciidoc system for 8.x and earlier versions.
160
+
161
+
### Supported lifecycles
162
+
163
+
-`PREVIEW` - Feature is in technical preview
164
+
-`GA` - Feature is generally available
165
+
166
+
> [!NOTE] Unreleased version information is automatically sanitized in the docs build output. For example, say you specify `preview 9.3.0`:
167
+
> - Before `9.3.0` is released, the live documentation will display "Planned for a future release" instead of the specific version number.
168
+
> - This will be updated automatically when the version is released.
169
+
108
170
## Tutorials
109
171
110
172
### Adding a new command
111
173
112
174
When adding a new command, for example adding the `CHANGE_POINT` command, do the following:
113
175
1. Create a new file in the `_snippets/commands/layout` directory with the name of the command, for example `change_point.md`.
114
-
2. Add the content for the command to the file. See other files in this directory for examples.
115
-
3. Add the command to the list in `_snippets/lists/processing-commands.md`.
116
-
4. Add an include directive to the `commands/processing-commands.md` file to include the new command.
117
-
5. Add tested examples to the `_snippets/commands/examples` directory. See below for details.
176
+
2. Ensure to specify what versions the command applies to. See [Version differentiation in Docs V3](#version-differentiation-in-docs-v3) for details. [Example PR](https://github.com/elastic/elasticsearch/pull/130314/files#diff-0ab90b6202c5d9eeea75dc95a7cb71dc4d720230342718bff887816771a5a803R3-R6).
177
+
3. Add the content for the command to the file. See other files in this directory for examples.
178
+
4. Add the command to the list in `_snippets/lists/processing-commands.md`.
179
+
5. Add an include directive to the `commands/processing-commands.md` file to include the new command.
180
+
6. Add tested examples to the `_snippets/commands/examples` directory. See below for details.
0 commit comments