Browse Source

[DOCS] Update ES|QL generated docs to consistently use the `applies_to` metadata (#128576)

- Add PREVIEW annotations to all preview functions
- Update docs generation logic to use annotations instead of preview boolean
* Changed stack: ga 9.1 to stack: coming in multiple places
  - Match.java: Updated the options parameter description
  - MultiMatch.java: Updated the options parameter description
  - ToLower.java: Reformatted parameter description and updated version annotation
  - ToUpper.java: Removed the appliesTo annotation entirely and reformatted parameter description

- updated applies_to annotations to specify both preview 9.0.0 and ga 9.1.0 lifecycle stages
- added version-specific documentation examples with applies_to markers for ga 9.1.0 features
- enhanced to_lower and to_upper functions to indicate support for multi-valued expressions in ga 9.1.0
- added version guards around function parameters and descriptions using applies_to syntax
- updated function parameter descriptions to indicate ga 9.1.0 availability for named parameters
- use detailedDescription + and fix match_phrase applies_to syntax
- strip inline applies_to from kibana docs
- update roundto, matchphrase lifecycles
-  fix match named params info
- various spatial functions are preview
- unsigned long is preview
- update qstr
- Update TO_LOWER/TO_UPPER parameter descriptions for clarity
- hide spatial functions per https://github.com/elastic/elasticsearch/pull/129839
- added `stack: ga 9.1.0` blocks to match_phrase.md and qstr.md examples
- simplified term.md version from `preview 9.0.0` to just `preview`
- added `applies_to = "stack: ga 9.1.0"` to matchphrase and querystring java annotations
- removed version `9.0.0` from term function annotation
- deleted unused `makeCallout()` and `appendLifeCycleAndVersion()` methods


Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Nik Everett <nik9000@gmail.com>
Craig Taverner 3 months ago
parent
commit
e6347b8ab0
92 changed files with 346 additions and 280 deletions
  1. 13 1
      docs/reference/query-languages/esql/_snippets/functions/description/match.md
  2. 10 1
      docs/reference/query-languages/esql/_snippets/functions/description/match_phrase.md
  3. 4 0
      docs/reference/query-languages/esql/_snippets/functions/examples/match_phrase.md
  4. 4 0
      docs/reference/query-languages/esql/_snippets/functions/examples/qstr.md
  5. 4 0
      docs/reference/query-languages/esql/_snippets/functions/examples/to_lower.md
  6. 4 6
      docs/reference/query-languages/esql/_snippets/functions/layout/kql.md
  7. 4 10
      docs/reference/query-languages/esql/_snippets/functions/layout/match.md
  8. 4 10
      docs/reference/query-languages/esql/_snippets/functions/layout/match_phrase.md
  9. 4 10
      docs/reference/query-languages/esql/_snippets/functions/layout/multi_match.md
  10. 4 10
      docs/reference/query-languages/esql/_snippets/functions/layout/qstr.md
  11. 1 2
      docs/reference/query-languages/esql/_snippets/functions/layout/round_to.md
  12. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_centroid_agg.md
  13. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_envelope.md
  14. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_extent_agg.md
  15. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash.md
  16. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_long.md
  17. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_string.md
  18. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex.md
  19. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_long.md
  20. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_string.md
  21. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile.md
  22. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_long.md
  23. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_string.md
  24. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_xmax.md
  25. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_xmin.md
  26. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_ymax.md
  27. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/st_ymin.md
  28. 4 6
      docs/reference/query-languages/esql/_snippets/functions/layout/term.md
  29. 1 2
      docs/reference/query-languages/esql/_snippets/functions/layout/to_aggregate_metric_double.md
  30. 0 4
      docs/reference/query-languages/esql/_snippets/functions/layout/to_lower.md
  31. 4 0
      docs/reference/query-languages/esql/_snippets/functions/layout/to_unsigned_long.md
  32. 0 4
      docs/reference/query-languages/esql/_snippets/functions/layout/to_upper.md
  33. 4 6
      docs/reference/query-languages/esql/_snippets/functions/layout/values.md
  34. 1 1
      docs/reference/query-languages/esql/_snippets/functions/parameters/match.md
  35. 1 1
      docs/reference/query-languages/esql/_snippets/functions/parameters/to_lower.md
  36. 1 1
      docs/reference/query-languages/esql/_snippets/functions/parameters/to_upper.md
  37. 2 2
      docs/reference/query-languages/esql/_snippets/lists/type-conversion-functions.md
  38. 4 0
      docs/reference/query-languages/esql/_snippets/operators/layout/match_operator.md
  39. 0 1
      docs/reference/query-languages/esql/functions-operators/spatial-functions.md
  40. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/match.json
  41. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/match_phrase.json
  42. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/st_centroid_agg.json
  43. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/st_envelope.json
  44. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/st_extent_agg.json
  45. 2 2
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohash.json
  46. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_long.json
  47. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_string.json
  48. 2 2
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohex.json
  49. 2 2
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_long.json
  50. 2 2
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_string.json
  51. 2 2
      docs/reference/query-languages/esql/kibana/definition/functions/st_geotile.json
  52. 2 2
      docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_long.json
  53. 2 2
      docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_string.json
  54. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/st_xmax.json
  55. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/st_xmin.json
  56. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/st_ymax.json
  57. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/st_ymin.json
  58. 2 2
      docs/reference/query-languages/esql/kibana/definition/functions/to_lower.json
  59. 1 1
      docs/reference/query-languages/esql/kibana/definition/functions/to_unsigned_long.json
  60. 2 2
      docs/reference/query-languages/esql/kibana/definition/functions/to_upper.json
  61. 0 11
      docs/reference/query-languages/esql/kibana/docs/functions/match.md
  62. 0 9
      docs/reference/query-languages/esql/kibana/docs/functions/match_phrase.md
  63. 5 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/Example.java
  64. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/SpatialCentroid.java
  65. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/SpatialExtent.java
  66. 3 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Values.java
  67. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Kql.java
  68. 8 11
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java
  69. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchOperator.java
  70. 4 8
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchPhrase.java
  71. 4 6
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/QueryString.java
  72. 3 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Term.java
  73. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLong.java
  74. 1 1
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundTo.java
  75. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StEnvelope.java
  76. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohash.java
  77. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohashToLong.java
  78. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohashToString.java
  79. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohex.java
  80. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohexToLong.java
  81. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohexToString.java
  82. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeotile.java
  83. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeotileToLong.java
  84. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeotileToString.java
  85. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StXMax.java
  86. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StXMin.java
  87. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StYMax.java
  88. 4 0
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StYMin.java
  89. 7 11
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/ToLower.java
  90. 4 11
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/ToUpper.java
  91. 53 70
      x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/DocsV3Support.java
  92. 6 34
      x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/DocsV3SupportTests.java

+ 13 - 1
docs/reference/query-languages/esql/_snippets/functions/description/match.md

@@ -2,5 +2,17 @@
 
 **Description**
 
-Use `MATCH` to perform a [match query](/reference/query-languages/query-dsl/query-dsl-match-query.md) on the specified field. Using `MATCH` is equivalent to using the `match` query in the Elasticsearch Query DSL.  Match can be used on fields from the text family like [text](/reference/elasticsearch/mapping-reference/text.md) and [semantic_text](/reference/elasticsearch/mapping-reference/semantic-text.md), as well as other field types like keyword, boolean, dates, and numeric types. When Match is used on a [semantic_text](/reference/elasticsearch/mapping-reference/semantic-text.md) field, it will perform a semantic query on the field.  Match can use [function named parameters](/reference/query-languages/esql/esql-syntax.md#esql-function-named-params) to specify additional options for the match query. All [match query parameters](/reference/query-languages/query-dsl/query-dsl-match-query.md#match-field-params) are supported.  For a simplified syntax, you can use the [match operator](/reference/query-languages/esql/functions-operators/operators.md#esql-match-operator) `:` operator instead of `MATCH`.  `MATCH` returns true if the provided query matches the row.
+Use `MATCH` to perform a [match query](/reference/query-languages/query-dsl/query-dsl-match-query.md) on the specified field. Using `MATCH` is equivalent to using the `match` query in the Elasticsearch Query DSL.
+
+Match can be used on fields from the text family like [text](/reference/elasticsearch/mapping-reference/text.md) and [semantic_text](/reference/elasticsearch/mapping-reference/semantic-text.md),
+as well as other field types like keyword, boolean, dates, and numeric types.
+When Match is used on a [semantic_text](/reference/elasticsearch/mapping-reference/semantic-text.md) field, it will perform a semantic query on the field.
+
+Match can use [function named parameters](/reference/query-languages/esql/esql-syntax.md#esql-function-named-params) to specify additional options
+for the match query.
+All [match query parameters](/reference/query-languages/query-dsl/query-dsl-match-query.md#match-field-params) are supported.
+
+For a simplified syntax, you can use the [match operator](/reference/query-languages/esql/functions-operators/operators.md#esql-match-operator) `:` operator instead of `MATCH`.
+
+`MATCH` returns true if the provided query matches the row.
 

+ 10 - 1
docs/reference/query-languages/esql/_snippets/functions/description/match_phrase.md

@@ -2,5 +2,14 @@
 
 **Description**
 
-Use `MATCH_PHRASE` to perform a [`match_phrase`](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) on the specified field. Using `MATCH_PHRASE` is equivalent to using the `match_phrase` query in the Elasticsearch Query DSL.  MatchPhrase can be used on [text](/reference/elasticsearch/mapping-reference/text.md) fields, as well as other field types like keyword, boolean, or date types. MatchPhrase is not supported for [semantic_text](/reference/elasticsearch/mapping-reference/semantic-text.md) or numeric types.  MatchPhrase can use [function named parameters](/reference/query-languages/esql/esql-syntax.md#esql-function-named-params) to specify additional options for the match_phrase query. All [`match_phrase`](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) query parameters are supported.  `MATCH_PHRASE` returns true if the provided query matches the row.
+Use `MATCH_PHRASE` to perform a [`match_phrase`](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) on the specified field. Using `MATCH_PHRASE` is equivalent to using the `match_phrase` query in the Elasticsearch Query DSL.
+
+MatchPhrase can be used on [text](/reference/elasticsearch/mapping-reference/text.md) fields, as well as other field types like keyword, boolean, or date types.
+MatchPhrase is not supported for [semantic_text](/reference/elasticsearch/mapping-reference/semantic-text.md) or numeric types.
+
+MatchPhrase can use [function named parameters](/reference/query-languages/esql/esql-syntax.md#esql-function-named-params) to specify additional options for the
+match_phrase query.
+All [`match_phrase`](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) query parameters are supported.
+
+`MATCH_PHRASE` returns true if the provided query matches the row.
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/examples/match_phrase.md

@@ -2,6 +2,10 @@
 
 **Example**
 
+```{applies_to}
+stack: ga 9.1.0
+```
+
 ```esql
 FROM books
 | WHERE MATCH_PHRASE(author, "William Faulkner")

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/examples/qstr.md

@@ -15,6 +15,10 @@ FROM books
 | 2883 | William Faulkner |
 | 3293 | Danny Faulkner |
 
+```{applies_to}
+stack: ga 9.1.0
+```
+
 ```esql
 FROM books
 | WHERE QSTR("title: Hobbjt~", {"fuzziness": 2})

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/examples/to_lower.md

@@ -11,6 +11,10 @@ ROW message = "Some Text"
 | --- | --- |
 | Some Text | some text |
 
+```{applies_to}
+stack: ga 9.1.0
+```
+
 ```esql
 ROW v = TO_LOWER(["Some", "Text"])
 ```

+ 4 - 6
docs/reference/query-languages/esql/_snippets/functions/layout/kql.md

@@ -1,12 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `KQL` [esql-kql]
-:::{warning}
-Do not use on production environments. This functionality is in technical preview and
-may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview
-are not subject to the support SLA of official GA features.
-:::
-
+```{applies_to}
+stack: preview 9.0.0
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 10
docs/reference/query-languages/esql/_snippets/functions/layout/match.md

@@ -1,16 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `MATCH` [esql-match]
-:::{warning}
-Do not use on production environments. This functionality is in technical preview and
-may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview
-are not subject to the support SLA of official GA features.
-:::
-
-:::{note}
-###### Serverless: GA, Elastic Stack: COMING
-Support for optional named parameters is only available in serverless, or in a future {{es}} release
-:::
+```{applies_to}
+stack: preview 9.0.0
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 10
docs/reference/query-languages/esql/_snippets/functions/layout/match_phrase.md

@@ -1,16 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `MATCH_PHRASE` [esql-match_phrase]
-:::{warning}
-Do not use on production environments. This functionality is in technical preview and
-may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview
-are not subject to the support SLA of official GA features.
-:::
-
-:::{note}
-###### Serverless: GA, Elastic Stack: COMING
-Support for optional named parameters is only available in serverless, or in a future {{es}} release
-:::
+```{applies_to}
+stack: preview 9.1.0
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 10
docs/reference/query-languages/esql/_snippets/functions/layout/multi_match.md

@@ -1,16 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `MULTI_MATCH` [esql-multi_match]
-:::{warning}
-Do not use on production environments. This functionality is in technical preview and
-may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview
-are not subject to the support SLA of official GA features.
-:::
-
-:::{note}
-###### Serverless: GA, Elastic Stack: COMING 9.1.0
-Support for optional named parameters is only available from 9.1.0
-:::
+```{applies_to}
+stack: coming 9.1.0
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 10
docs/reference/query-languages/esql/_snippets/functions/layout/qstr.md

@@ -1,16 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `QSTR` [esql-qstr]
-:::{warning}
-Do not use on production environments. This functionality is in technical preview and
-may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview
-are not subject to the support SLA of official GA features.
-:::
-
-:::{note}
-###### Serverless: GA, Elastic Stack: COMING
-Support for optional named parameters is only available in serverless, or in a future {{es}} release
-:::
+```{applies_to}
+stack: preview 9.0.0
+serverless: preview
+```
 
 **Syntax**
 

+ 1 - 2
docs/reference/query-languages/esql/_snippets/functions/layout/round_to.md

@@ -2,8 +2,7 @@
 
 ## `ROUND_TO` [esql-round_to]
 ```{applies_to}
-product: COMING 8.19.0/9.1.0
-serverless: GA
+stack: preview 9.1.0
 ```
 
 **Syntax**

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_centroid_agg.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `ST_CENTROID_AGG` [esql-st_centroid_agg]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_envelope.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `ST_ENVELOPE` [esql-st_envelope]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_extent_agg.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `ST_EXTENT_AGG` [esql-st_extent_agg]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `ST_GEOHASH` [esql-st_geohash]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_long.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_GEOHASH_TO_LONG` [esql-st_geohash_to_long]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_string.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_GEOHASH_TO_STRING` [esql-st_geohash_to_string]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `ST_GEOHEX` [esql-st_geohex]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_long.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_GEOHEX_TO_LONG` [esql-st_geohex_to_long]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_string.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_GEOHEX_TO_STRING` [esql-st_geohex_to_string]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `ST_GEOTILE` [esql-st_geotile]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_long.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_GEOTILE_TO_LONG` [esql-st_geotile_to_long]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_string.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_GEOTILE_TO_STRING` [esql-st_geotile_to_string]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_xmax.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_XMAX` [esql-st_xmax]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_xmin.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_XMIN` [esql-st_xmin]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_ymax.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_YMAX` [esql-st_ymax]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/st_ymin.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ### `ST_YMIN` [esql-st_ymin]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 4 - 6
docs/reference/query-languages/esql/_snippets/functions/layout/term.md

@@ -1,12 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `TERM` [esql-term]
-:::{warning}
-Do not use on production environments. This functionality is in technical preview and
-may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview
-are not subject to the support SLA of official GA features.
-:::
-
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 1 - 2
docs/reference/query-languages/esql/_snippets/functions/layout/to_aggregate_metric_double.md

@@ -2,8 +2,7 @@
 
 ## `TO_AGGREGATE_METRIC_DOUBLE` [esql-to_aggregate_metric_double]
 ```{applies_to}
-product: COMING
-serverless: GA
+stack: coming
 ```
 
 **Syntax**

+ 0 - 4
docs/reference/query-languages/esql/_snippets/functions/layout/to_lower.md

@@ -1,10 +1,6 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `TO_LOWER` [esql-to_lower]
-:::{note}
-###### Serverless: GA, Elastic Stack: COMING 9.1.0
-Support for multivalued parameters is only available from 9.1.0
-:::
 
 **Syntax**
 

+ 4 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/to_unsigned_long.md

@@ -1,6 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `TO_UNSIGNED_LONG` [esql-to_unsigned_long]
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 0 - 4
docs/reference/query-languages/esql/_snippets/functions/layout/to_upper.md

@@ -1,10 +1,6 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `TO_UPPER` [esql-to_upper]
-:::{note}
-###### Serverless: GA, Elastic Stack: COMING 9.1.0
-Support for multivalued parameters is only available from 9.1.0
-:::
 
 **Syntax**
 

+ 4 - 6
docs/reference/query-languages/esql/_snippets/functions/layout/values.md

@@ -1,12 +1,10 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
 ## `VALUES` [esql-values]
-:::{warning}
-Do not use on production environments. This functionality is in technical preview and
-may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview
-are not subject to the support SLA of official GA features.
-:::
-
+```{applies_to}
+stack: preview
+serverless: preview
+```
 
 **Syntax**
 

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/parameters/match.md

@@ -9,5 +9,5 @@
 :   Value to find in the provided field.
 
 `options`
-:   (Optional) Match additional options as [function named parameters](/reference/query-languages/esql/esql-syntax.md#esql-function-named-params). See [match query](/reference/query-languages/query-dsl/query-dsl-match-query.md) for more information.
+:   (Optional) Match additional options as [function named parameters](/reference/query-languages/esql/esql-syntax.md#esql-function-named-params).
 

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/parameters/to_lower.md

@@ -3,5 +3,5 @@
 **Parameters**
 
 `str`
-:   String expression. If `null`, the function returns `null`. The input can be a single- or multi-valued column or an expression.
+:   String expression. If `null`, the function returns `null`. The input can be a single-valued column or expression, or a multi-valued column or expression {applies_to}`stack: ga 9.1.0`. 
 

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/parameters/to_upper.md

@@ -3,5 +3,5 @@
 **Parameters**
 
 `str`
-:   String expression. If `null`, the function returns `null`. The input can be a single- or multi-valued column or an expression.
+:   String expression. If `null`, the function returns `null`. The input can be a single-valued column or expression, or a multi-valued column or expression {applies_to}`stack: ga 9.1.0`. 
 

+ 2 - 2
docs/reference/query-languages/esql/_snippets/lists/type-conversion-functions.md

@@ -1,7 +1,7 @@
 * [`TO_BOOLEAN`](../../functions-operators/type-conversion-functions.md#esql-to_boolean)
 * [`TO_CARTESIANPOINT`](../../functions-operators/type-conversion-functions.md#esql-to_cartesianpoint)
 * [`TO_CARTESIANSHAPE`](../../functions-operators/type-conversion-functions.md#esql-to_cartesianshape)
-* [preview] [`TO_DATEPERIOD`](../../functions-operators/type-conversion-functions.md#esql-to_dateperiod)
+* [`TO_DATEPERIOD`](../../functions-operators/type-conversion-functions.md#esql-to_dateperiod)
 * [`TO_DATETIME`](../../functions-operators/type-conversion-functions.md#esql-to_datetime)
 * [`TO_DATE_NANOS`](../../functions-operators/type-conversion-functions.md#esql-to_date_nanos)
 * [`TO_DEGREES`](../../functions-operators/type-conversion-functions.md#esql-to_degrees)
@@ -13,6 +13,6 @@
 * [`TO_LONG`](../../functions-operators/type-conversion-functions.md#esql-to_long)
 * [`TO_RADIANS`](../../functions-operators/type-conversion-functions.md#esql-to_radians)
 * [`TO_STRING`](../../functions-operators/type-conversion-functions.md#esql-to_string)
-* [preview] [`TO_TIMEDURATION`](../../functions-operators/type-conversion-functions.md#esql-to_timeduration)
+* [`TO_TIMEDURATION`](../../functions-operators/type-conversion-functions.md#esql-to_timeduration)
 * [preview] [`TO_UNSIGNED_LONG`](../../functions-operators/type-conversion-functions.md#esql-to_unsigned_long)
 * [`TO_VERSION`](../../functions-operators/type-conversion-functions.md#esql-to_version)

+ 4 - 0
docs/reference/query-languages/esql/_snippets/operators/layout/match_operator.md

@@ -1,4 +1,8 @@
 ### Match operator (`:`) [esql-match-operator]
+```{applies_to}
+stack: preview 9.0.0
+serverless: preview
+```
 
 The only search operator is match (`:`).
 

+ 0 - 1
docs/reference/query-languages/esql/functions-operators/spatial-functions.md

@@ -47,4 +47,3 @@ mapped_pages:
 
 :::{include} ../_snippets/functions/layout/st_ymin.md
 :::
-

File diff suppressed because it is too large
+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/match.json


+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/match_phrase.json

@@ -2,7 +2,7 @@
   "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
   "type" : "scalar",
   "name" : "match_phrase",
-  "description" : "Use `MATCH_PHRASE` to perform a `match_phrase` on the\nspecified field.\nUsing `MATCH_PHRASE` is equivalent to using the `match_phrase` query in the Elasticsearch Query DSL.\n\nMatchPhrase can be used on text fields, as well as other field types like keyword, boolean, or date types.\nMatchPhrase is not supported for semantic_text or numeric types.\n\nMatchPhrase can use function named parameters to specify additional options for the\nmatch_phrase query.\nAll `match_phrase` query parameters are supported.\n\n`MATCH_PHRASE` returns true if the provided query matches the row.",
+  "description" : "Use `MATCH_PHRASE` to perform a `match_phrase` on the\nspecified field.\nUsing `MATCH_PHRASE` is equivalent to using the `match_phrase` query in the Elasticsearch Query DSL.",
   "signatures" : [
     {
       "params" : [

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/st_centroid_agg.json

@@ -32,6 +32,6 @@
   "examples" : [
     "FROM airports\n| STATS centroid=ST_CENTROID_AGG(location)"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : false
 }

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/st_envelope.json

@@ -56,6 +56,6 @@
   "examples" : [
     "FROM airport_city_boundaries\n| WHERE abbrev == \"CPH\"\n| EVAL envelope = ST_ENVELOPE(city_boundary)\n| KEEP abbrev, airport, envelope"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : false
 }

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/st_extent_agg.json

@@ -58,6 +58,6 @@
   "examples" : [
     "FROM airports\n| WHERE country == \"India\"\n| STATS extent = ST_EXTENT_AGG(location)"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : false
 }

+ 2 - 2
docs/reference/query-languages/esql/kibana/definition/functions/st_geohash.json

@@ -50,6 +50,6 @@
   "examples" : [
     "FROM airports\n| EVAL geohash = ST_GEOHASH(location, 1)\n| STATS\n    count = COUNT(*),\n    centroid = ST_CENTROID_AGG(location)\n      BY geohash\n| WHERE count >= 10\n| EVAL geohashString = ST_GEOHASH_TO_STRING(geohash)\n| KEEP count, centroid, geohashString\n| SORT count DESC, geohashString ASC"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : true
-}
+}

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_long.json

@@ -32,6 +32,6 @@
   "examples" : [
     "ROW geohash = \"u3bu\"\n| EVAL geohashLong = ST_GEOHASH_TO_LONG(geohash)"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : true
 }

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_string.json

@@ -32,6 +32,6 @@
   "examples" : [
     "ROW geohash = TO_LONG(13686180)\n| EVAL geohashString = ST_GEOHASH_TO_STRING(geohash)"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : true
 }

+ 2 - 2
docs/reference/query-languages/esql/kibana/definition/functions/st_geohex.json

@@ -53,6 +53,6 @@
   "examples" : [
     "FROM airports\n| EVAL geohex = ST_GEOHEX(location, 1)\n| STATS\n    count = COUNT(*),\n    centroid = ST_CENTROID_AGG(location)\n      BY geohex\n| WHERE count >= 10\n| EVAL geohexString = ST_GEOHEX_TO_STRING(geohex)\n| KEEP count, centroid, geohexString\n| SORT count DESC, geohexString ASC"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : true
-}
+}

+ 2 - 2
docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_long.json

@@ -32,6 +32,6 @@
   "examples" : [
     "ROW geohex = \"841f059ffffffff\"\n| EVAL geohexLong = ST_GEOHEX_TO_LONG(geohex)"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : true
-}
+}

+ 2 - 2
docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_string.json

@@ -32,6 +32,6 @@
   "examples" : [
     "ROW geohex = 595020895127339007\n| EVAL geohexString = ST_GEOHEX_TO_STRING(geohex)"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : true
-}
+}

+ 2 - 2
docs/reference/query-languages/esql/kibana/definition/functions/st_geotile.json

@@ -50,6 +50,6 @@
   "examples" : [
     "FROM airports\n| EVAL geotile = ST_GEOTILE(location, 2)\n| STATS\n    count = COUNT(*),\n    centroid = ST_CENTROID_AGG(location)\n      BY geotile\n| EVAL geotileString = ST_GEOTILE_TO_STRING(geotile)\n| SORT count DESC, geotileString ASC\n| KEEP count, centroid, geotileString"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : true
-}
+}

+ 2 - 2
docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_long.json

@@ -32,6 +32,6 @@
   "examples" : [
     "ROW geotile = \"4/8/5\"\n| EVAL geotileLong = ST_GEOTILE_TO_LONG(geotile)"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : true
-}
+}

+ 2 - 2
docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_string.json

@@ -32,6 +32,6 @@
   "examples" : [
     "ROW geotile = 1152921508901814277\n| EVAL geotileString = ST_GEOTILE_TO_STRING(geotile)"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : true
-}
+}

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/st_xmax.json

@@ -56,6 +56,6 @@
   "examples" : [
     "FROM airport_city_boundaries\n| WHERE abbrev == \"CPH\"\n| EVAL envelope = ST_ENVELOPE(city_boundary)\n| EVAL xmin = ST_XMIN(envelope), xmax = ST_XMAX(envelope), ymin = ST_YMIN(envelope), ymax = ST_YMAX(envelope)\n| KEEP abbrev, airport, xmin, xmax, ymin, ymax"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : false
 }

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/st_xmin.json

@@ -56,6 +56,6 @@
   "examples" : [
     "FROM airport_city_boundaries\n| WHERE abbrev == \"CPH\"\n| EVAL envelope = ST_ENVELOPE(city_boundary)\n| EVAL xmin = ST_XMIN(envelope), xmax = ST_XMAX(envelope), ymin = ST_YMIN(envelope), ymax = ST_YMAX(envelope)\n| KEEP abbrev, airport, xmin, xmax, ymin, ymax"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : false
 }

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/st_ymax.json

@@ -56,6 +56,6 @@
   "examples" : [
     "FROM airport_city_boundaries\n| WHERE abbrev == \"CPH\"\n| EVAL envelope = ST_ENVELOPE(city_boundary)\n| EVAL xmin = ST_XMIN(envelope), xmax = ST_XMAX(envelope), ymin = ST_YMIN(envelope), ymax = ST_YMAX(envelope)\n| KEEP abbrev, airport, xmin, xmax, ymin, ymax"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : false
 }

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/st_ymin.json

@@ -56,6 +56,6 @@
   "examples" : [
     "FROM airport_city_boundaries\n| WHERE abbrev == \"CPH\"\n| EVAL envelope = ST_ENVELOPE(city_boundary)\n| EVAL xmin = ST_XMIN(envelope), xmax = ST_XMAX(envelope), ymin = ST_YMIN(envelope), ymax = ST_YMAX(envelope)\n| KEEP abbrev, airport, xmin, xmax, ymin, ymax"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : false
 }

+ 2 - 2
docs/reference/query-languages/esql/kibana/definition/functions/to_lower.json

@@ -10,7 +10,7 @@
           "name" : "str",
           "type" : "keyword",
           "optional" : false,
-          "description" : "String expression. If `null`, the function returns `null`. The input can be a single- or multi-valued column or an expression."
+          "description" : "String expression. If `null`, the function returns `null`. The input can be a single-valued column or expression, or a multi-valued column or expression. "
         }
       ],
       "variadic" : false,
@@ -22,7 +22,7 @@
           "name" : "str",
           "type" : "text",
           "optional" : false,
-          "description" : "String expression. If `null`, the function returns `null`. The input can be a single- or multi-valued column or an expression."
+          "description" : "String expression. If `null`, the function returns `null`. The input can be a single-valued column or expression, or a multi-valued column or expression. "
         }
       ],
       "variadic" : false,

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/to_unsigned_long.json

@@ -104,6 +104,6 @@
   "examples" : [
     "ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n| EVAL long1 = TO_UNSIGNED_LONG(str1), long2 = TO_ULONG(str2), long3 = TO_UL(str3)"
   ],
-  "preview" : false,
+  "preview" : true,
   "snapshot_only" : false
 }

+ 2 - 2
docs/reference/query-languages/esql/kibana/definition/functions/to_upper.json

@@ -10,7 +10,7 @@
           "name" : "str",
           "type" : "keyword",
           "optional" : false,
-          "description" : "String expression. If `null`, the function returns `null`. The input can be a single- or multi-valued column or an expression."
+          "description" : "String expression. If `null`, the function returns `null`. The input can be a single-valued column or expression, or a multi-valued column or expression. "
         }
       ],
       "variadic" : false,
@@ -22,7 +22,7 @@
           "name" : "str",
           "type" : "text",
           "optional" : false,
-          "description" : "String expression. If `null`, the function returns `null`. The input can be a single- or multi-valued column or an expression."
+          "description" : "String expression. If `null`, the function returns `null`. The input can be a single-valued column or expression, or a multi-valued column or expression. "
         }
       ],
       "variadic" : false,

+ 0 - 11
docs/reference/query-languages/esql/kibana/docs/functions/match.md

@@ -4,17 +4,6 @@
 Use `MATCH` to perform a [match query](https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query) on the specified field.
 Using `MATCH` is equivalent to using the `match` query in the Elasticsearch Query DSL.
 
-Match can be used on fields from the text family like [text](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/text) and [semantic_text](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/semantic-text),
-as well as other field types like keyword, boolean, dates, and numeric types.
-When Match is used on a [semantic_text](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/semantic-text) field, it will perform a semantic query on the field.
-
-Match can use [function named parameters](https://www.elastic.co/docs/reference/query-languages/esql/esql-syntax#esql-function-named-params) to specify additional options for the match query.
-All [match query parameters](https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query#match-field-params) are supported.
-
-For a simplified syntax, you can use the [match operator](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/operators#esql-match-operator) `:` operator instead of `MATCH`.
-
-`MATCH` returns true if the provided query matches the row.
-
 ```esql
 FROM books
 | WHERE MATCH(author, "Faulkner")

+ 0 - 9
docs/reference/query-languages/esql/kibana/docs/functions/match_phrase.md

@@ -5,15 +5,6 @@ Use `MATCH_PHRASE` to perform a [`match_phrase`](https://www.elastic.co/docs/ref
 specified field.
 Using `MATCH_PHRASE` is equivalent to using the `match_phrase` query in the Elasticsearch Query DSL.
 
-MatchPhrase can be used on [text](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/text) fields, as well as other field types like keyword, boolean, or date types.
-MatchPhrase is not supported for [semantic_text](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/semantic-text) or numeric types.
-
-MatchPhrase can use [function named parameters](https://www.elastic.co/docs/reference/query-languages/esql/esql-syntax#esql-function-named-params) to specify additional options for the
-match_phrase query.
-All [`match_phrase`](https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase) query parameters are supported.
-
-`MATCH_PHRASE` returns true if the provided query matches the row.
-
 ```esql
 FROM books
 | WHERE MATCH_PHRASE(author, "William Faulkner")

+ 5 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/Example.java

@@ -34,6 +34,11 @@ public @interface Example {
      */
     String tag();
 
+    /**
+     * If the example is applicable to only a capability available in a specific version
+     */
+    String applies_to() default "";
+
     /**
      * The explanation that will appear after the example.
      */

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/SpatialCentroid.java

@@ -21,6 +21,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.FunctionType;
 import org.elasticsearch.xpack.esql.expression.function.Param;
@@ -45,6 +47,8 @@ public class SpatialCentroid extends SpatialAggregateFunction implements ToAggre
 
     @FunctionInfo(
         returnType = { "geo_point", "cartesian_point" },
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Calculate the spatial centroid over a field with spatial point geometry type.",
         type = FunctionType.AGGREGATE,
         examples = @Example(file = "spatial", tag = "st_centroid_agg-airports")

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/SpatialExtent.java

@@ -25,6 +25,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.FunctionType;
 import org.elasticsearch.xpack.esql.expression.function.Param;
@@ -48,6 +50,8 @@ public final class SpatialExtent extends SpatialAggregateFunction implements ToA
 
     @FunctionInfo(
         returnType = { "geo_shape", "cartesian_shape" },
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Calculate the spatial extent over a field with geometry type. Returns a bounding box for all values of the field.",
         type = FunctionType.AGGREGATE,
         examples = @Example(file = "spatial", tag = "st_extent_agg-airports")

+ 3 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Values.java

@@ -23,6 +23,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.FunctionType;
 import org.elasticsearch.xpack.esql.expression.function.Param;
@@ -72,6 +74,7 @@ public class Values extends AggregateFunction implements ToAggregator {
             "long",
             "version" },
         preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = """
             Returns unique values as a multivalued field. The order of the returned values isn’t guaranteed.
             If you need the values returned in order use

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Kql.java

@@ -17,6 +17,8 @@ import org.elasticsearch.xpack.esql.core.querydsl.query.Query;
 import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput;
@@ -36,6 +38,8 @@ public class Kql extends FullTextFunction {
     @FunctionInfo(
         returnType = "boolean",
         preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW, version = "9.0.0") },
+        // @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") },
         description = "Performs a KQL query. Returns true if the provided KQL query string matches the row.",
         examples = { @Example(file = "kql-function", tag = "kql-with-field") }
     )

+ 8 - 11
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java

@@ -136,15 +136,18 @@ public class Match extends FullTextFunction implements OptionalArgument, PostAna
     @FunctionInfo(
         returnType = "boolean",
         preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW, version = "9.0.0") },
+        // @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") },
         description = """
             Use `MATCH` to perform a <<query-dsl-match-query,match query>> on the specified field.
-            Using `MATCH` is equivalent to using the `match` query in the Elasticsearch Query DSL.
-
+            Using `MATCH` is equivalent to using the `match` query in the Elasticsearch Query DSL.""",
+        detailedDescription = """
             Match can be used on fields from the text family like <<text, text>> and <<semantic-text, semantic_text>>,
             as well as other field types like keyword, boolean, dates, and numeric types.
             When Match is used on a <<semantic-text, semantic_text>> field, it will perform a semantic query on the field.
 
-            Match can use <<esql-function-named-params,function named parameters>> to specify additional options for the match query.
+            Match can use <<esql-function-named-params,function named parameters>> to specify additional options
+            for the match query.
             All <<match-field-params,match query parameters>> are supported.
 
             For a simplified syntax, you can use the <<esql-match-operator,match operator>> `:` operator instead of `MATCH`.
@@ -152,12 +155,7 @@ public class Match extends FullTextFunction implements OptionalArgument, PostAna
             `MATCH` returns true if the provided query matches the row.""",
         examples = {
             @Example(file = "match-function", tag = "match-with-field"),
-            @Example(file = "match-function", tag = "match-with-named-function-params") },
-        appliesTo = {
-            @FunctionAppliesTo(
-                lifeCycle = FunctionAppliesToLifecycle.COMING,
-                description = "Support for optional named parameters is only available in serverless, or in a future {{es}} release"
-            ) }
+            @Example(file = "match-function", tag = "match-with-named-function-params") }
     )
     public Match(
         Source source,
@@ -173,6 +171,7 @@ public class Match extends FullTextFunction implements OptionalArgument, PostAna
         ) Expression matchQuery,
         @MapParam(
             name = "options",
+            description = "(Optional) Match additional options as <<esql-function-named-params,function named parameters>>.",
             params = {
                 @MapParam.MapParamEntry(
                     name = "analyzer",
@@ -258,8 +257,6 @@ public class Match extends FullTextFunction implements OptionalArgument, PostAna
                     description = "Indicates whether all documents or none are returned if the analyzer removes all tokens, such as "
                         + "when using a stop filter. Defaults to none."
                 ) },
-            description = "(Optional) Match additional options as <<esql-function-named-params,function named parameters>>."
-                + " See <<query-dsl-match-query,match query>> for more information.",
             optional = true
         ) Expression options
     ) {

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchOperator.java

@@ -12,6 +12,8 @@ import org.elasticsearch.xpack.esql.core.expression.Expression;
 import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 
@@ -29,6 +31,8 @@ public class MatchOperator extends Match {
         returnType = "boolean",
         operator = ":",
         preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW, version = "9.0.0") },
+        // @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") },
         description = """
             Use the match operator (`:`) to perform a <<query-dsl-match-query,match query>> on the specified field.
             Using `:` is equivalent to using the `match` query in the Elasticsearch Query DSL.

+ 4 - 8
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchPhrase.java

@@ -93,11 +93,12 @@ public class MatchPhrase extends FullTextFunction implements OptionalArgument, P
     @FunctionInfo(
         returnType = "boolean",
         preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW, version = "9.1.0") },
         description = """
             Use `MATCH_PHRASE` to perform a [`match_phrase`](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) on the
             specified field.
-            Using `MATCH_PHRASE` is equivalent to using the `match_phrase` query in the Elasticsearch Query DSL.
-
+            Using `MATCH_PHRASE` is equivalent to using the `match_phrase` query in the Elasticsearch Query DSL.""",
+        detailedDescription = """
             MatchPhrase can be used on <<text, text>> fields, as well as other field types like keyword, boolean, or date types.
             MatchPhrase is not supported for <<semantic-text, semantic_text>> or numeric types.
 
@@ -106,12 +107,7 @@ public class MatchPhrase extends FullTextFunction implements OptionalArgument, P
             All [`match_phrase`](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) query parameters are supported.
 
             `MATCH_PHRASE` returns true if the provided query matches the row.""",
-        examples = { @Example(file = "match-phrase-function", tag = "match-phrase-with-field") },
-        appliesTo = {
-            @FunctionAppliesTo(
-                lifeCycle = FunctionAppliesToLifecycle.COMING,
-                description = "Support for optional named parameters is only available in serverless, or in a future {{es}} release"
-            ) }
+        examples = { @Example(file = "match-phrase-function", tag = "match-phrase-with-field", applies_to = "stack: ga 9.1.0") }
     )
     public MatchPhrase(
         Source source,

+ 4 - 6
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/QueryString.java

@@ -105,17 +105,15 @@ public class QueryString extends FullTextFunction implements OptionalArgument {
     @FunctionInfo(
         returnType = "boolean",
         preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW, version = "9.0.0") },
+        // @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") },
         description = "Performs a <<query-dsl-query-string-query,query string query>>. "
             + "Returns true if the provided query string matches the row.",
         examples = {
             @Example(file = "qstr-function", tag = "qstr-with-field"),
-            @Example(file = "qstr-function", tag = "qstr-with-options") },
-        appliesTo = {
-            @FunctionAppliesTo(
-                lifeCycle = FunctionAppliesToLifecycle.COMING,
-                description = "Support for optional named parameters is only available in serverless, or in a future {{es}} release"
-            ) }
+            @Example(file = "qstr-function", tag = "qstr-with-options", applies_to = "stack: ga 9.1.0") }
     )
+
     public QueryString(
         Source source,
         @Param(

+ 3 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Term.java

@@ -23,6 +23,8 @@ import org.elasticsearch.xpack.esql.core.querydsl.query.TermQuery;
 import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput;
@@ -50,6 +52,7 @@ public class Term extends FullTextFunction implements PostAnalysisPlanVerificati
     @FunctionInfo(
         returnType = "boolean",
         preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Performs a Term query on the specified field. Returns true if the provided term matches the row.",
         examples = { @Example(file = "term-function", tag = "term-with-field") }
     )

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLong.java

@@ -17,6 +17,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 
@@ -58,6 +60,8 @@ public class ToUnsignedLong extends AbstractConvertFunction {
 
     @FunctionInfo(
         returnType = "unsigned_long",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = """
             Converts an input value to an unsigned long value. If the input parameter is of a date type,
             its value will be interpreted as milliseconds since the {wikipedia}/Unix_time[Unix epoch], converted to unsigned long.

+ 1 - 1
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundTo.java

@@ -57,7 +57,7 @@ public class RoundTo extends EsqlScalarFunction {
         description = """
             Rounds down to one of a list of fixed points.""",
         examples = @Example(file = "math", tag = "round_to"),
-        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.COMING, version = "8.19.0/9.1.0") }
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW, version = "9.1.0") }
     )
     public RoundTo(
         Source source,

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StEnvelope.java

@@ -21,6 +21,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.UnaryScalarFunction;
@@ -51,6 +53,8 @@ public class StEnvelope extends UnaryScalarFunction {
 
     @FunctionInfo(
         returnType = { "geo_shape", "cartesian_shape" },
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Determines the minimum bounding box of the supplied geometry.",
         examples = @Example(file = "spatial_shapes", tag = "st_envelope")
     )

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohash.java

@@ -26,6 +26,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 
@@ -100,6 +102,8 @@ public class StGeohash extends SpatialGridFunction implements EvaluatorMapper {
 
     @FunctionInfo(
         returnType = "long",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = """
             Calculates the `geohash` of the supplied geo_point at the specified precision.
             The result is long encoded. Use [ST_GEOHASH_TO_STRING](#esql-st_geohash_to_string) to convert the result to a string.

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohashToLong.java

@@ -18,6 +18,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.convert.AbstractConvertFunction;
@@ -43,6 +45,8 @@ public class StGeohashToLong extends AbstractConvertFunction implements Evaluato
 
     @FunctionInfo(
         returnType = "long",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Converts an input value representing a geohash grid-ID in string format into a long.",
         examples = { @Example(file = "spatial-grid", tag = "geohash_to_long") },
         depthOffset = 1 // make it appear as a subsection of ST_GEOHASH

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohashToString.java

@@ -18,6 +18,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.convert.AbstractConvertFunction;
@@ -43,6 +45,8 @@ public class StGeohashToString extends AbstractConvertFunction implements Evalua
 
     @FunctionInfo(
         returnType = "keyword",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Converts an input value representing a geohash grid-ID in long format into a string.",
         examples = { @Example(file = "spatial-grid", tag = "geohash_to_string") },
         depthOffset = 1 // make it appear as a subsection of ST_GEOHASH

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohex.java

@@ -27,6 +27,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 
@@ -98,6 +100,8 @@ public class StGeohex extends SpatialGridFunction implements EvaluatorMapper {
 
     @FunctionInfo(
         returnType = "long",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = """
             Calculates the `geohex`, the H3 cell-id, of the supplied geo_point at the specified precision.
             The result is long encoded. Use [ST_GEOHEX_TO_STRING](#esql-st_geohex_to_string) to convert the result to a string.

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohexToLong.java

@@ -18,6 +18,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.convert.AbstractConvertFunction;
@@ -43,6 +45,8 @@ public class StGeohexToLong extends AbstractConvertFunction implements Evaluator
 
     @FunctionInfo(
         returnType = "long",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Converts an input value representing a geohex grid-ID in string format into a long.",
         examples = { @Example(file = "spatial-grid", tag = "geohex_to_long") },
         depthOffset = 1 // make it appear as a subsection of ST_GEOHEX

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeohexToString.java

@@ -18,6 +18,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.convert.AbstractConvertFunction;
@@ -43,6 +45,8 @@ public class StGeohexToString extends AbstractConvertFunction implements Evaluat
 
     @FunctionInfo(
         returnType = "keyword",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Converts an input value representing a Geohex grid-ID in long format into a string.",
         examples = { @Example(file = "spatial-grid", tag = "geohex_to_string") },
         depthOffset = 1 // make it appear as a subsection of ST_GEOHEX

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeotile.java

@@ -26,6 +26,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 
@@ -94,6 +96,8 @@ public class StGeotile extends SpatialGridFunction implements EvaluatorMapper {
 
     @FunctionInfo(
         returnType = "long",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = """
             Calculates the `geotile` of the supplied geo_point at the specified precision.
             The result is long encoded. Use [ST_GEOTILE_TO_STRING](#esql-st_geotile_to_string) to convert the result to a string.

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeotileToLong.java

@@ -18,6 +18,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.convert.AbstractConvertFunction;
@@ -43,6 +45,8 @@ public class StGeotileToLong extends AbstractConvertFunction implements Evaluato
 
     @FunctionInfo(
         returnType = "long",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Converts an input value representing a geotile grid-ID in string format into a long.",
         examples = { @Example(file = "spatial-grid", tag = "geotile_to_long") },
         depthOffset = 1 // make it appear as a subsection of ST_GEOTILE

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StGeotileToString.java

@@ -18,6 +18,8 @@ import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.convert.AbstractConvertFunction;
@@ -43,6 +45,8 @@ public class StGeotileToString extends AbstractConvertFunction implements Evalua
 
     @FunctionInfo(
         returnType = "keyword",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Converts an input value representing a geotile grid-ID in long format into a string.",
         examples = { @Example(file = "spatial-grid", tag = "geotile_to_string") },
         depthOffset = 1 // make it appear as a subsection of ST_GEOTILE

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StXMax.java

@@ -21,6 +21,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.UnaryScalarFunction;
@@ -43,6 +45,8 @@ public class StXMax extends UnaryScalarFunction {
 
     @FunctionInfo(
         returnType = "double",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Extracts the maximum value of the `x` coordinates from the supplied geometry.\n"
             + "If the geometry is of type `geo_point` or `geo_shape` this is equivalent to extracting the maximum `longitude` value.",
         examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max"),

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StXMin.java

@@ -21,6 +21,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.UnaryScalarFunction;
@@ -43,6 +45,8 @@ public class StXMin extends UnaryScalarFunction {
 
     @FunctionInfo(
         returnType = "double",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Extracts the minimum value of the `x` coordinates from the supplied geometry.\n"
             + "If the geometry is of type `geo_point` or `geo_shape` this is equivalent to extracting the minimum `longitude` value.",
         examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max"),

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StYMax.java

@@ -21,6 +21,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.UnaryScalarFunction;
@@ -43,6 +45,8 @@ public class StYMax extends UnaryScalarFunction {
 
     @FunctionInfo(
         returnType = "double",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Extracts the maximum value of the `y` coordinates from the supplied geometry.\n"
             + "If the geometry is of type `geo_point` or `geo_shape` this is equivalent to extracting the maximum `latitude` value.",
         examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max"),

+ 4 - 0
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StYMin.java

@@ -21,6 +21,8 @@ import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.core.type.DataType;
 import org.elasticsearch.xpack.esql.expression.function.Example;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.expression.function.scalar.UnaryScalarFunction;
@@ -43,6 +45,8 @@ public class StYMin extends UnaryScalarFunction {
 
     @FunctionInfo(
         returnType = "double",
+        preview = true,
+        appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
         description = "Extracts the minimum value of the `y` coordinates from the supplied geometry.\n"
             + "If the geometry is of type `geo_point` or `geo_shape` this is equivalent to extracting the minimum `latitude` value.",
         examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max"),

+ 7 - 11
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/ToLower.java

@@ -15,8 +15,6 @@ import org.elasticsearch.xpack.esql.core.expression.Expression;
 import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.expression.function.Example;
-import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
-import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput;
@@ -30,17 +28,15 @@ public class ToLower extends ChangeCase {
     @FunctionInfo(
         returnType = { "keyword" },
         description = "Returns a new string representing the input string converted to lower case.",
-        examples = { @Example(file = "string", tag = "to_lower"), @Example(file = "string", tag = "to_lower_mv"), },
-        appliesTo = {
-            @FunctionAppliesTo(
-                lifeCycle = FunctionAppliesToLifecycle.COMING,
-                version = "9.1.0",
-                description = "Support for multivalued parameters is only available from 9.1.0"
-            ) }
+        examples = {
+            @Example(file = "string", tag = "to_lower"),
+            @Example(file = "string", tag = "to_lower_mv", applies_to = "stack: ga 9.1.0") }
     )
+
     public ToLower(Source source, @Param(name = "str", type = { "keyword", "text" }, description = """
-        String expression. If `null`, the function returns `null`.
-        The input can be a single- or multi-valued column or an expression.""") Expression field, Configuration configuration) {
+        String expression. If `null`, the function returns `null`. The input can be a single-valued column or expression,
+        or a multi-valued column or expression {applies_to}`stack: ga 9.1.0`.
+        """) Expression field, Configuration configuration) {
         super(source, field, configuration, Case.LOWER);
     }
 

+ 4 - 11
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/ToUpper.java

@@ -15,8 +15,6 @@ import org.elasticsearch.xpack.esql.core.expression.Expression;
 import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
 import org.elasticsearch.xpack.esql.core.tree.Source;
 import org.elasticsearch.xpack.esql.expression.function.Example;
-import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
-import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
 import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
 import org.elasticsearch.xpack.esql.expression.function.Param;
 import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput;
@@ -30,17 +28,12 @@ public class ToUpper extends ChangeCase {
     @FunctionInfo(
         returnType = { "keyword" },
         description = "Returns a new string representing the input string converted to upper case.",
-        examples = @Example(file = "string", tag = "to_upper"),
-        appliesTo = {
-            @FunctionAppliesTo(
-                lifeCycle = FunctionAppliesToLifecycle.COMING,
-                version = "9.1.0",
-                description = "Support for multivalued parameters is only available from 9.1.0"
-            ) }
+        examples = @Example(file = "string", tag = "to_upper")
     )
     public ToUpper(Source source, @Param(name = "str", type = { "keyword", "text" }, description = """
-        String expression. If `null`, the function returns `null`.
-        The input can be a single- or multi-valued column or an expression.""") Expression field, Configuration configuration) {
+        String expression. If `null`, the function returns `null`. The input can be a single-valued column or expression,
+        or a multi-valued column or expression {applies_to}`stack: ga 9.1.0`.
+        """) Expression field, Configuration configuration) {
         super(source, field, configuration, Case.UPPER);
     }
 

+ 53 - 70
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/DocsV3Support.java

@@ -75,7 +75,6 @@ import static org.elasticsearch.xpack.esql.expression.function.AbstractFunctionT
 import static org.elasticsearch.xpack.esql.expression.function.EsqlFunctionRegistry.mapParam;
 import static org.elasticsearch.xpack.esql.expression.function.EsqlFunctionRegistry.param;
 import static org.elasticsearch.xpack.esql.expression.function.EsqlFunctionRegistry.paramWithoutAnnotation;
-import static org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle.GA;
 
 /**
  * This class exists to support the new Docs V3 system.
@@ -99,12 +98,6 @@ public abstract class DocsV3Support {
 
     protected static final String DOCS_WARNING = "% " + DOCS_WARNING_JSON + "\n\n";
 
-    static final String PREVIEW_CALLOUT = """
-        Do not use on production environments. This functionality is in technical preview and
-        may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview
-        are not subject to the support SLA of official GA features.
-        """;
-
     static FunctionDocsSupport forFunctions(String name, Class<?> testClass) {
         return new FunctionDocsSupport(name, testClass);
     }
@@ -599,73 +592,35 @@ public abstract class DocsV3Support {
             writeToTempSnippetsDir("functionNamedParams", rendered.toString());
         }
 
-        private String makeCallout(String type, String text) {
-            return ":::{" + type + "}\n" + text.trim() + "\n:::\n";
-        }
-
-        private String makePreviewText(boolean preview, FunctionAppliesTo[] functionAppliesTos) {
-            String appliesToTextWithAT = appliesToText(functionAppliesTos);
-            String appliesToText = appliesToTextWithoutAppliesTo(functionAppliesTos);
-            StringBuilder previewText = new StringBuilder();
-            if (preview) {
-                // We have a preview flag, use the WARNING callout
-                previewText.append(makeCallout("warning", "\n" + PREVIEW_CALLOUT + "\n")).append("\n");
-            }
-            if (appliesToTextWithAT.isEmpty() == false) {
-                // No additional text, just use the plan applies_to syntax
-                previewText.append(appliesToTextWithAT);
-            } else if (appliesToText.isEmpty() == false) {
-                // We have extra descriptive text, nest inside a NOTE for emphasis
-                previewText.append(makeCallout("note", appliesToText));
-            }
-            return previewText.toString();
-        }
-
-        private String appliesToText(FunctionAppliesTo[] functionAppliesTos) {
+        private String makeAppliesToText(FunctionAppliesTo[] functionAppliesTos, boolean preview) {
             StringBuilder appliesToText = new StringBuilder();
             if (functionAppliesTos.length > 0) {
                 appliesToText.append("```{applies_to}\n");
+                StringBuilder stackEntries = new StringBuilder();
+
                 for (FunctionAppliesTo appliesTo : functionAppliesTos) {
-                    if (appliesTo.description().isEmpty() == false) {
-                        // If any of the appliesTo has descriptive text, we need to format things differently
-                        return "";
+                    if (stackEntries.isEmpty() == false) {
+                        stackEntries.append(", ");
                     }
-                    appliesToText.append("product: ");
-                    appendLifeCycleAndVersion(appliesToText, appliesTo);
-                    appliesToText.append("\n");
-                    if (appliesTo.serverless() && appliesTo.lifeCycle().serverlessLifecycle() == GA) {
-                        appliesToText.append("serverless: ").append(GA).append("\n");
+                    stackEntries.append(appliesTo.lifeCycle().name().toLowerCase(Locale.ROOT));
+                    if (appliesTo.version().isEmpty() == false) {
+                        stackEntries.append(" ").append(appliesTo.version());
                     }
                 }
-                appliesToText.append("```\n");
-            }
-            return appliesToText.toString();
-        }
 
-        private String appliesToTextWithoutAppliesTo(FunctionAppliesTo[] functionAppliesTos) {
-            StringBuilder appliesToText = new StringBuilder();
-            if (functionAppliesTos.length > 0) {
-                appliesToText.append("\n");
-                for (FunctionAppliesTo appliesTo : functionAppliesTos) {
-                    appliesToText.append("###### ");
-                    if (appliesTo.serverless() && appliesTo.lifeCycle().serverlessLifecycle() == GA) {
-                        appliesToText.append("Serverless: ").append(GA).append(", Elastic Stack: ");
-                    }
-                    appendLifeCycleAndVersion(appliesToText, appliesTo);
-                    appliesToText.append("\n");
-                    if (appliesTo.description().isEmpty() == false) {
-                        appliesToText.append(appliesTo.description()).append("\n\n");
-                    }
+                // Add the stack entries
+                if (stackEntries.isEmpty() == false) {
+                    appliesToText.append("stack: ").append(stackEntries).append("\n");
                 }
-            }
-            return appliesToText.toString();
-        }
 
-        private void appendLifeCycleAndVersion(StringBuilder appliesToText, FunctionAppliesTo appliesTo) {
-            appliesToText.append(appliesTo.lifeCycle().name());
-            if (appliesTo.version().isEmpty() == false) {
-                appliesToText.append(" ").append(appliesTo.version());
+                // Only specify serverless if it's preview, using the preview boolean (GA is the default)
+                if (preview) {
+                    appliesToText.append("serverless: preview\n");
+                }
+
+                appliesToText.append("```\n");
             }
+            return appliesToText.toString();
         }
 
         private void renderFullLayout(FunctionInfo info, boolean hasExamples, boolean hasAppendix, boolean hasFunctionOptions)
@@ -674,7 +629,7 @@ public abstract class DocsV3Support {
             StringBuilder rendered = new StringBuilder(
                 DOCS_WARNING + """
                     $HEAD$ `$UPPER_NAME$` [esql-$NAME$]
-                    $PREVIEW_CALLOUT$
+                    $APPLIES_TO$
                     **Syntax**
 
                     :::{image} ../../../images/$CATEGORY$/$NAME$.svg
@@ -686,7 +641,7 @@ public abstract class DocsV3Support {
                     .replace("$NAME$", name)
                     .replace("$CATEGORY$", category)
                     .replace("$UPPER_NAME$", name.toUpperCase(Locale.ROOT))
-                    .replace("$PREVIEW_CALLOUT$", makePreviewText(info.preview(), info.appliesTo()))
+                    .replace("$APPLIES_TO$", makeAppliesToText(info.appliesTo(), info.preview()))
             );
             for (String section : new String[] { "parameters", "description", "types" }) {
                 rendered.append(addInclude(section));
@@ -1027,6 +982,11 @@ public abstract class DocsV3Support {
             builder.append("**Examples**\n\n");
         }
         for (Example example : info.examples()) {
+            if (example.applies_to().isEmpty() == false) {
+                builder.append("```{applies_to}\n");
+                builder.append(example.applies_to()).append("\n");
+                builder.append("```\n\n");
+            }
             if (example.description().isEmpty() == false) {
                 builder.append(replaceLinks(example.description().trim()));
                 builder.append("\n\n");
@@ -1059,7 +1019,9 @@ public abstract class DocsV3Support {
         StringBuilder builder = new StringBuilder();
         builder.append(DOCS_WARNING);
         builder.append("### ").append(titleName.toUpperCase(Locale.ROOT)).append("\n");
-        builder.append(replaceLinks(info.description())).append("\n\n");
+        String cleanedDesc = replaceLinks(info.description());
+        cleanedDesc = removeAppliesToBlocks(cleanedDesc);
+        builder.append(cleanedDesc).append("\n\n");
 
         if (info.examples().length > 0) {
             Example example = info.examples()[0];
@@ -1068,7 +1030,9 @@ public abstract class DocsV3Support {
             builder.append("\n```\n");
         }
         if (Strings.isNullOrEmpty(info.note()) == false) {
-            builder.append("Note: ").append(replaceLinks(info.note())).append("\n");
+            String cleanedNote = replaceLinks(info.note());
+            cleanedNote = removeAppliesToBlocks(cleanedNote);
+            builder.append("Note: ").append(cleanedNote).append("\n");
         }
         String rendered = builder.toString();
         logger.info("Writing kibana inline docs for [{}]:\n{}", name, rendered);
@@ -1105,9 +1069,13 @@ public abstract class DocsV3Support {
             if (titleName != null && titleName.equals(name) == false) {
                 builder.field("titleName", titleName);
             }
-            builder.field("description", removeAsciidocLinks(info.description()));
+            String cleanedDescription = removeAsciidocLinks(info.description());
+            cleanedDescription = removeAppliesToBlocks(cleanedDescription);
+            builder.field("description", cleanedDescription);
             if (Strings.isNullOrEmpty(info.note()) == false) {
-                builder.field("note", removeAsciidocLinks(info.note()));
+                String cleanedNote = removeAsciidocLinks(info.note());
+                cleanedNote = removeAppliesToBlocks(cleanedNote);
+                builder.field("note", cleanedNote);
             }
             // TODO aliases
 
@@ -1152,7 +1120,8 @@ public abstract class DocsV3Support {
                             builder.field("type", sig.getKey().get(i).esNameIfPossible());
                         }
                         builder.field("optional", arg.optional());
-                        builder.field("description", arg.description());
+                        String cleanedParamDesc = removeAppliesToBlocks(arg.description());
+                        builder.field("description", cleanedParamDesc);
                         builder.endObject();
                     }
                     builder.endArray();
@@ -1190,6 +1159,20 @@ public abstract class DocsV3Support {
         return md.replaceAll("\\[(\\s*`?[^]]+?`?\\s*)]\\(([^()\\s]+(?:\\([^()]*\\)[^()]*)*)\\)", "$1");
     }
 
+    /**
+     * Removes applies_to blocks from content intended for Kibana consumption.
+     * Applies_to syntax like {applies_to}`stack: ga 9.1.0` should not appear in Kibana JSON files.
+     */
+    private static String removeAppliesToBlocks(String content) {
+        if (content == null) {
+            return null;
+        }
+
+        // Remove {applies_to}`...` blocks using regex
+        // Matches: {applies_to}`anything` including backticks and content inside
+        return content.replaceAll("\\s*\\{applies_to\\}`[^`]*`\\s*", "");
+    }
+
     private List<Map.Entry<List<DataType>, DataType>> sortedSignatures() {
         List<Map.Entry<List<DataType>, DataType>> sortedSignatures = new ArrayList<>(signatures.get().entrySet());
         sortedSignatures.sort((lhs, rhs) -> {

+ 6 - 34
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/DocsV3SupportTests.java

@@ -274,7 +274,7 @@ public class DocsV3SupportTests extends ESTestCase {
 
             To count the number of times an expression returns `TRUE` use a
             [`WHERE`](/reference/query-languages/esql/commands/processing-commands.md#esql-where) command
-            to remove rows that shouldnt be included
+            to remove rows that shouldn't be included
 
             ```esql
             ROW n=1
@@ -311,22 +311,9 @@ public class DocsV3SupportTests extends ESTestCase {
             % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
 
             ## `COUNT` [esql-count]
-            :::{warning}
-            Do not use on production environments. This functionality is in technical preview and
-            may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview
-            are not subject to the support SLA of official GA features.
-            :::
-
-            :::{note}
-            ###### Serverless: GA, Elastic Stack: COMING 9.1.0
-            Support for optional named parameters is only available from 9.1.0
-
-            ###### DEVELOPMENT
-            The ability to generate more imaginative answers to the question is under development
-
-            ###### DISCONTINUED 9.0.0
-            The ability to count the number of emojis in a string has been discontinued since 9.0.0
-            :::
+            ```{applies_to}
+            stack: ga 9.1.0
+            ```
 
             **Syntax**
 
@@ -406,7 +393,6 @@ public class DocsV3SupportTests extends ESTestCase {
     public static class TestClass extends Function {
         @FunctionInfo(
             returnType = "long",
-            preview = true,
             description = "Returns the total number (count) of input values.",
             type = FunctionType.AGGREGATE,
             examples = {
@@ -418,7 +404,7 @@ public class DocsV3SupportTests extends ESTestCase {
                 @Example(description = """
                     To count the number of times an expression returns `TRUE` use a
                     <<esql-where>> command
-                    to remove rows that shouldnt be included""", file = "stats", tag = "count-where"),
+                    to remove rows that shouldn't be included""", file = "stats", tag = "count-where"),
                 @Example(
                     description = """
                         To count the same stream of data based on two different expressions use the pattern
@@ -429,21 +415,7 @@ public class DocsV3SupportTests extends ESTestCase {
                     file = "stats",
                     tag = "count-or-null"
                 ) },
-            appliesTo = {
-                @FunctionAppliesTo(
-                    lifeCycle = FunctionAppliesToLifecycle.COMING,
-                    version = "9.1.0",
-                    description = "Support for optional named parameters is only available from 9.1.0"
-                ),
-                @FunctionAppliesTo(
-                    lifeCycle = FunctionAppliesToLifecycle.DEVELOPMENT,
-                    description = "The ability to generate more imaginative answers to the question is under development"
-                ),
-                @FunctionAppliesTo(
-                    lifeCycle = FunctionAppliesToLifecycle.DISCONTINUED,
-                    version = "9.0.0",
-                    description = "The ability to count the number of emojis in a string has been discontinued since 9.0.0"
-                ) }
+            appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") }
         )
         public TestClass(Source source, @Param(name = "str", type = { "keyword", "text" }, description = """
             String expression. If `null`, the function returns `null`.

Some files were not shown because too many files changed in this diff