Explorar o código

[DOCS] Split ESQL commands into standalone pages (#133073)

Liam Thompson hai 1 mes
pai
achega
7c2a1fb67e
Modificáronse 64 ficheiros con 434 adicións e 183 borrados
  1. 64 1
      docs/redirects.yml
  2. 4 6
      docs/reference/query-languages/esql/_snippets/commands/layout/change_point.md
  3. 0 1
      docs/reference/query-languages/esql/_snippets/commands/layout/completion.md
  4. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/dissect.md
  5. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/drop.md
  6. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/enrich.md
  7. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/eval.md
  8. 0 2
      docs/reference/query-languages/esql/_snippets/commands/layout/fork.md
  9. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/from.md
  10. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/grok.md
  11. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/keep.md
  12. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/limit.md
  13. 0 2
      docs/reference/query-languages/esql/_snippets/commands/layout/lookup-join.md
  14. 4 9
      docs/reference/query-languages/esql/_snippets/commands/layout/mv_expand.md
  15. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/rename.md
  16. 0 1
      docs/reference/query-languages/esql/_snippets/commands/layout/rerank.md
  17. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/row.md
  18. 0 2
      docs/reference/query-languages/esql/_snippets/commands/layout/sample.md
  19. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/show.md
  20. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/sort.md
  21. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/stats-by.md
  22. 5 2
      docs/reference/query-languages/esql/_snippets/commands/layout/ts.md
  23. 4 1
      docs/reference/query-languages/esql/_snippets/commands/layout/where.md
  24. 2 2
      docs/reference/query-languages/esql/_snippets/common/result-set-size-limitation.md
  25. 2 2
      docs/reference/query-languages/esql/_snippets/functions/examples/bucket.md
  26. 1 1
      docs/reference/query-languages/esql/_snippets/functions/examples/count.md
  27. 1 2
      docs/reference/query-languages/esql/_snippets/functions/examples/date_trunc.md
  28. 18 18
      docs/reference/query-languages/esql/_snippets/lists/processing-commands.md
  29. 3 3
      docs/reference/query-languages/esql/_snippets/lists/source-commands.md
  30. 10 0
      docs/reference/query-languages/esql/commands/change-point.md
  31. 10 0
      docs/reference/query-languages/esql/commands/completion.md
  32. 10 0
      docs/reference/query-languages/esql/commands/dissect.md
  33. 10 0
      docs/reference/query-languages/esql/commands/drop.md
  34. 10 0
      docs/reference/query-languages/esql/commands/enrich.md
  35. 10 0
      docs/reference/query-languages/esql/commands/eval.md
  36. 10 0
      docs/reference/query-languages/esql/commands/fork.md
  37. 10 0
      docs/reference/query-languages/esql/commands/from.md
  38. 10 0
      docs/reference/query-languages/esql/commands/grok.md
  39. 10 0
      docs/reference/query-languages/esql/commands/keep.md
  40. 10 0
      docs/reference/query-languages/esql/commands/limit.md
  41. 10 0
      docs/reference/query-languages/esql/commands/lookup-join.md
  42. 10 0
      docs/reference/query-languages/esql/commands/mv_expand.md
  43. 4 55
      docs/reference/query-languages/esql/commands/processing-commands.md
  44. 10 0
      docs/reference/query-languages/esql/commands/rename.md
  45. 10 0
      docs/reference/query-languages/esql/commands/rerank.md
  46. 10 0
      docs/reference/query-languages/esql/commands/row.md
  47. 10 0
      docs/reference/query-languages/esql/commands/sample.md
  48. 10 0
      docs/reference/query-languages/esql/commands/show.md
  49. 10 0
      docs/reference/query-languages/esql/commands/sort.md
  50. 3 9
      docs/reference/query-languages/esql/commands/source-commands.md
  51. 10 0
      docs/reference/query-languages/esql/commands/stats-by.md
  52. 10 0
      docs/reference/query-languages/esql/commands/where.md
  53. 6 24
      docs/reference/query-languages/esql/esql-commands.md
  54. 4 4
      docs/reference/query-languages/esql/esql-enrich-data.md
  55. 4 4
      docs/reference/query-languages/esql/esql-lookup-join.md
  56. 1 1
      docs/reference/query-languages/esql/esql-metadata-fields.md
  57. 3 3
      docs/reference/query-languages/esql/esql-process-data-with-dissect-grok.md
  58. 1 1
      docs/reference/query-languages/esql/functions-operators/aggregation-functions.md
  59. 1 1
      docs/reference/query-languages/esql/functions-operators/grouping-functions.md
  60. 8 8
      docs/reference/query-languages/esql/limitations.md
  61. 23 0
      docs/reference/query-languages/toc.yml
  62. 1 1
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Count.java
  63. 2 2
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/grouping/Bucket.java
  64. 3 2
      x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateTrunc.java

+ 64 - 1
docs/redirects.yml

@@ -22,4 +22,67 @@ redirects:
       - to: 'reference/elasticsearch/rest-apis/retrievers/rule-retriever.md'
         anchors: {'rule-retriever'}
       - to: 'reference/elasticsearch/rest-apis/retrievers/pinned-retriever.md'
-        anchors: {'pinned-retriever'}
+        anchors: {'pinned-retriever'}
+  
+  # ESQL command redirects - split from aggregate pages to individual pages
+  'reference/query-languages/esql/commands/source-commands.md':
+    to: 'reference/query-languages/esql/commands/source-commands.md'
+    anchors: {} # pass-through unlisted anchors in the `many` ruleset
+    many:
+      - to: 'reference/query-languages/esql/commands/from.md'
+        anchors: {'esql-from'}
+      - to: 'reference/query-languages/esql/commands/row.md'
+        anchors: {'esql-row'}
+      - to: 'reference/query-languages/esql/commands/show.md'
+        anchors: {'esql-show'}
+  
+  # Handle old anchor references to esql-commands.md
+  'reference/query-languages/esql/esql-commands.md':
+    to: 'reference/query-languages/esql/esql-commands.md'
+    anchors: {} # pass-through unlisted anchors in the `many` ruleset
+    many:
+      - to: 'reference/query-languages/esql/commands/source-commands.md'
+        anchors: {'esql-source-commands'}
+      - to: 'reference/query-languages/esql/commands/processing-commands.md'
+        anchors: {'esql-processing-commands'}
+  
+  'reference/query-languages/esql/commands/processing-commands.md':
+    to: 'reference/query-languages/esql/commands/processing-commands.md'
+    anchors: {} # pass-through unlisted anchors in the `many` ruleset
+    many:
+      - to: 'reference/query-languages/esql/commands/change-point.md'
+        anchors: {'esql-change_point'}
+      - to: 'reference/query-languages/esql/commands/completion.md'
+        anchors: {'esql-completion'}
+      - to: 'reference/query-languages/esql/commands/dissect.md'
+        anchors: {'esql-dissect'}
+      - to: 'reference/query-languages/esql/commands/drop.md'
+        anchors: {'esql-drop'}
+      - to: 'reference/query-languages/esql/commands/enrich.md'
+        anchors: {'esql-enrich'}
+      - to: 'reference/query-languages/esql/commands/eval.md'
+        anchors: {'esql-eval'}
+      - to: 'reference/query-languages/esql/commands/fork.md'
+        anchors: {'esql-fork'}
+      - to: 'reference/query-languages/esql/commands/grok.md'
+        anchors: {'esql-grok'}
+      - to: 'reference/query-languages/esql/commands/keep.md'
+        anchors: {'esql-keep'}
+      - to: 'reference/query-languages/esql/commands/limit.md'
+        anchors: {'esql-limit'}
+      - to: 'reference/query-languages/esql/commands/lookup-join.md'
+        anchors: {'esql-lookup-join'}
+      - to: 'reference/query-languages/esql/commands/mv_expand.md'
+        anchors: {'esql-mv_expand'}
+      - to: 'reference/query-languages/esql/commands/rename.md'
+        anchors: {'esql-rename'}
+      - to: 'reference/query-languages/esql/commands/rerank.md'
+        anchors: {'esql-rerank'}
+      - to: 'reference/query-languages/esql/commands/sample.md'
+        anchors: {'esql-sample'}
+      - to: 'reference/query-languages/esql/commands/sort.md'
+        anchors: {'esql-sort'}
+      - to: 'reference/query-languages/esql/commands/stats-by.md'
+        anchors: {'esql-stats-by'}
+      - to: 'reference/query-languages/esql/commands/where.md'
+        anchors: {'esql-where'}

+ 4 - 6
docs/reference/query-languages/esql/_snippets/commands/layout/change_point.md

@@ -1,14 +1,12 @@
-## `CHANGE_POINT` [esql-change_point]
-
-:::{note}
-The `CHANGE_POINT` command requires a [platinum license](https://www.elastic.co/subscriptions).
-:::
-
 ```yaml {applies_to}
 serverless: preview
 stack: preview 9.1.0
 ```
 
+:::{note}
+The `CHANGE_POINT` command requires a [platinum license](https://www.elastic.co/subscriptions).
+:::
+
 `CHANGE_POINT` detects spikes, dips, and change points in a metric.
 
 **Syntax**

+ 0 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/completion.md

@@ -1,4 +1,3 @@
-## `COMPLETION` [esql-completion]
 
 ```yaml {applies_to}
 serverless: preview

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/dissect.md

@@ -1,4 +1,7 @@
-## `DISSECT` [esql-dissect]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 `DISSECT` enables you to [extract structured data out of a string](/reference/query-languages/esql/esql-process-data-with-dissect-grok.md).
 

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/drop.md

@@ -1,4 +1,7 @@
-## `DROP` [esql-drop]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `DROP` processing command removes one or more columns.
 

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/enrich.md

@@ -1,4 +1,7 @@
-## `ENRICH` [esql-enrich]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 `ENRICH` enables you to add data from existing indices as new columns using an
 enrich policy.

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/eval.md

@@ -1,4 +1,7 @@
-## `EVAL` [esql-eval]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `EVAL` processing command enables you to append new columns with calculated
 values.

+ 0 - 2
docs/reference/query-languages/esql/_snippets/commands/layout/fork.md

@@ -1,5 +1,3 @@
-## `FORK` [esql-fork]
-
 ```yaml {applies_to}
 serverless: preview
 stack: preview 9.1.0

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/from.md

@@ -1,4 +1,7 @@
-## `FROM` [esql-from]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `FROM` source command returns a table with data from a data stream, index,
 or alias.

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/grok.md

@@ -1,4 +1,7 @@
-## `GROK` [esql-grok]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 `GROK` enables you to [extract structured data out of a string](/reference/query-languages/esql/esql-process-data-with-dissect-grok.md).
 

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/keep.md

@@ -1,4 +1,7 @@
-## `KEEP` [esql-keep]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `KEEP` processing command enables you to specify what columns are returned
 and the order in which they are returned.

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/limit.md

@@ -1,4 +1,7 @@
-## `LIMIT` [esql-limit]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `LIMIT` processing command enables you to limit the number of rows that are
 returned.

+ 0 - 2
docs/reference/query-languages/esql/_snippets/commands/layout/lookup-join.md

@@ -1,5 +1,3 @@
-## `LOOKUP JOIN` [esql-lookup-join]
-
 ```yaml {applies_to}
 stack: preview 9.0.0, ga 9.1.0
 ```

+ 4 - 9
docs/reference/query-languages/esql/_snippets/commands/layout/mv_expand.md

@@ -1,12 +1,7 @@
-## `MV_EXPAND` [esql-mv_expand]
-
-::::{warning}
-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.
-::::
-
+```yaml {applies_to}
+serverless: preview
+stack: preview
+```
 
 The `MV_EXPAND` processing command expands multivalued columns into one row per
 value, duplicating other columns.

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/rename.md

@@ -1,4 +1,7 @@
-## `RENAME` [esql-rename]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `RENAME` processing command renames one or more columns.
 

+ 0 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/rerank.md

@@ -1,4 +1,3 @@
-## `RERANK` [esql-rerank]
 
 ```yaml {applies_to}
 serverless: preview

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/row.md

@@ -1,4 +1,7 @@
-## `ROW` [esql-row]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `ROW` source command produces a row with one or more columns with values
 that you specify. This can be useful for testing.

+ 0 - 2
docs/reference/query-languages/esql/_snippets/commands/layout/sample.md

@@ -1,5 +1,3 @@
-## `SAMPLE` [esql-sample]
-
 ```yaml {applies_to}
 serverless: preview
 stack: preview 9.1.0

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/show.md

@@ -1,4 +1,7 @@
-## `SHOW` [esql-show]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `SHOW` source command returns information about the deployment and
 its capabilities.

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/sort.md

@@ -1,4 +1,7 @@
-## `SORT` [esql-sort]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `SORT` processing command sorts a table on one or more columns.
 

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/stats-by.md

@@ -1,4 +1,7 @@
-## `STATS` [esql-stats-by]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `STATS` processing command groups rows according to a common value
 and calculates one or more aggregated values over the grouped rows.

+ 5 - 2
docs/reference/query-languages/esql/_snippets/commands/layout/ts.md

@@ -1,9 +1,12 @@
-## `TS` [esql-ts]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `TS` command is similar to the `FROM` source command,
 but with two key differences: it targets only [time-series indices](docs-content://manage-data/data-store/data-streams/time-series-data-stream-tsds.md)
 and enables the use of time-series aggregation functions
-with the [STATS](/reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) command.
+with the [STATS](/reference/query-languages/esql/commands/stats-by.md) command.
 
 **Syntax**
 

+ 4 - 1
docs/reference/query-languages/esql/_snippets/commands/layout/where.md

@@ -1,4 +1,7 @@
-## `WHERE` [esql-where]
+```yaml {applies_to}
+serverless: ga
+stack: ga
+```
 
 The `WHERE` processing command produces a table that contains all the rows from
 the input table for which the provided condition evaluates to `true`.

+ 2 - 2
docs/reference/query-languages/esql/_snippets/common/result-set-size-limitation.md

@@ -11,8 +11,8 @@ Queries do not return more than 10,000 rows, regardless of the `LIMIT` command
 
 To overcome this limitation:
 
-* Reduce the result set size by modifying the query to only return relevant data. Use [`WHERE`](/reference/query-languages/esql/commands/processing-commands.md#esql-where) to select a smaller subset of the data.
-* Shift any post-query processing to the query itself. You can use the {{esql}} [`STATS`](/reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) command to aggregate data in the query.
+* Reduce the result set size by modifying the query to only return relevant data. Use [`WHERE`](/reference/query-languages/esql/commands/where.md) to select a smaller subset of the data.
+* Shift any post-query processing to the query itself. You can use the {{esql}} [`STATS`](/reference/query-languages/esql/commands/stats-by.md) command to aggregate data in the query.
 
 The upper limit only applies to the number of rows that are output by the query, not to the number of documents it processes: the query runs on the full data set.
 

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/examples/bucket.md

@@ -75,7 +75,7 @@ FROM employees
 ::::{note}
 `BUCKET` does not filter any rows. It only uses the provided range to pick a good bucket size.
 For rows with a value outside of the range, it returns a bucket value that corresponds to a bucket outside the range.
-Combine `BUCKET` with [`WHERE`](/reference/query-languages/esql/commands/processing-commands.md#esql-where) to filter rows.
+Combine `BUCKET` with [`WHERE`](/reference/query-languages/esql/commands/where.md) to filter rows.
 ::::
 
 If the desired bucket size is known in advance, simply provide it as the second
@@ -179,7 +179,7 @@ FROM employees
 | 54539.75 | 1985-11-01T00:00:00.000Z |
 
 `BUCKET` may be used in both the aggregating and grouping part of the
-[STATS ... BY ...](/reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) command provided that in the aggregating
+[STATS ... BY ...](/reference/query-languages/esql/commands/stats-by.md) command provided that in the aggregating
 part the function is referenced by an alias defined in the
 grouping part, or that it is invoked with the exact same expression:
 

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/examples/count.md

@@ -39,7 +39,7 @@ ROW words="foo;bar;baz;qux;quux;foo"
 | --- |
 | 6 |
 
-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 shouldn’t be included
+To count the number of times an expression returns `TRUE` use a [`WHERE`](/reference/query-languages/esql/commands/where.md) command to remove rows that shouldn’t be included
 
 ```esql
 ROW n=1

+ 1 - 2
docs/reference/query-languages/esql/_snippets/functions/examples/date_trunc.md

@@ -14,8 +14,7 @@ FROM employees
 | Amabile | Gomatam | 1992-11-18T00:00:00.000Z | 1992-01-01T00:00:00.000Z |
 | Anneke | Preusig | 1989-06-02T00:00:00.000Z | 1989-01-01T00:00:00.000Z |
 
-Combine `DATE_TRUNC` with [`STATS`](/reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) to create date histograms. For
-example, the number of hires per year:
+Combine `DATE_TRUNC` with [`STATS`](/reference/query-languages/esql/commands/stats-by.md) to create date histograms. For example, the number of hires per year:
 
 ```esql
 FROM employees

+ 18 - 18
docs/reference/query-languages/esql/_snippets/lists/processing-commands.md

@@ -1,18 +1,18 @@
-* [preview] [`CHANGE_POINT`](../../commands/processing-commands.md#esql-change_point)
-* [preview] [`COMPLETION`](../../commands/processing-commands.md#esql-completion)
-* [`DISSECT`](../../commands/processing-commands.md#esql-dissect)
-* [`DROP`](../../commands/processing-commands.md#esql-drop)
-* [`ENRICH`](../../commands/processing-commands.md#esql-enrich)
-* [`EVAL`](../../commands/processing-commands.md#esql-eval)
-* [`GROK`](../../commands/processing-commands.md#esql-grok)
-* [preview] [`FORK`](../../commands/processing-commands.md#esql-fork)
-* [`KEEP`](../../commands/processing-commands.md#esql-keep)
-* [`LIMIT`](../../commands/processing-commands.md#esql-limit)
-* [`LOOKUP JOIN`](../../commands/processing-commands.md#esql-lookup-join)
-* [preview] [`MV_EXPAND`](../../commands/processing-commands.md#esql-mv_expand)
-* [`RENAME`](../../commands/processing-commands.md#esql-rename)
-* [preview] [`RERANK`](../../commands/processing-commands.md#esql-rerank)
-* [preview] [`SAMPLE`](../../commands/processing-commands.md#esql-sample)
-* [`SORT`](../../commands/processing-commands.md#esql-sort)
-* [`STATS`](../../commands/processing-commands.md#esql-stats-by)
-* [`WHERE`](../../commands/processing-commands.md#esql-where)
+* [preview] [`CHANGE_POINT`](/reference/query-languages/esql/commands/change-point.md)
+* [preview] [`COMPLETION`](/reference/query-languages/esql/commands/completion.md)
+* [`DISSECT`](/reference/query-languages/esql/commands/dissect.md)
+* [`DROP`](/reference/query-languages/esql/commands/drop.md)
+* [`ENRICH`](/reference/query-languages/esql/commands/enrich.md)
+* [`EVAL`](/reference/query-languages/esql/commands/eval.md)
+* [`GROK`](/reference/query-languages/esql/commands/grok.md)
+* [preview] [`FORK`](/reference/query-languages/esql/commands/fork.md)
+* [`KEEP`](/reference/query-languages/esql/commands/keep.md)
+* [`LIMIT`](/reference/query-languages/esql/commands/limit.md)
+* [`LOOKUP JOIN`](/reference/query-languages/esql/commands/lookup-join.md)
+* [preview] [`MV_EXPAND`](/reference/query-languages/esql/commands/mv_expand.md)
+* [`RENAME`](/reference/query-languages/esql/commands/rename.md)
+* [preview] [`RERANK`](/reference/query-languages/esql/commands/rerank.md)
+* [preview] [`SAMPLE`](/reference/query-languages/esql/commands/sample.md)
+* [`SORT`](/reference/query-languages/esql/commands/sort.md)
+* [`STATS`](/reference/query-languages/esql/commands/stats-by.md)
+* [`WHERE`](/reference/query-languages/esql/commands/where.md)

+ 3 - 3
docs/reference/query-languages/esql/_snippets/lists/source-commands.md

@@ -1,3 +1,3 @@
-* [`FROM`](../../commands/source-commands.md#esql-from)
-* [`ROW`](../../commands/source-commands.md#esql-row)
-* [`SHOW`](../../commands/source-commands.md#esql-show)
+- [`FROM`](/reference/query-languages/esql/commands/from.md)
+- [`ROW`](/reference/query-languages/esql/commands/row.md)
+- [`SHOW`](/reference/query-languages/esql/commands/show.md)

+ 10 - 0
docs/reference/query-languages/esql/commands/change-point.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "CHANGE_POINT"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-change_point
+---
+
+# `CHANGE_POINT` [esql-change_point]
+
+:::{include} ../_snippets/commands/layout/change_point.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/completion.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "COMPLETION"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-completion
+---
+
+# `COMPLETION` [esql-completion]
+
+:::{include} ../_snippets/commands/layout/completion.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/dissect.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "DISSECT"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-dissect
+---
+
+# `DISSECT` [esql-dissect]
+
+:::{include} ../_snippets/commands/layout/dissect.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/drop.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "DROP"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-drop
+---
+
+# `DROP` [esql-drop]
+
+:::{include} ../_snippets/commands/layout/drop.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/enrich.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "ENRICH"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-enrich
+---
+
+# `ENRICH` [esql-enrich]
+
+:::{include} ../_snippets/commands/layout/enrich.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/eval.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "EVAL"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-eval
+---
+
+# `EVAL` [esql-eval]
+
+:::{include} ../_snippets/commands/layout/eval.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/fork.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "FORK"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-fork
+---
+
+# `FORK` [esql-fork]
+
+:::{include} ../_snippets/commands/layout/fork.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/from.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "FROM"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-from
+---
+
+# `FROM` [esql-from]
+
+:::{include} ../_snippets/commands/layout/from.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/grok.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "GROK"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-grok
+---
+
+# `GROK` [esql-grok]
+
+:::{include} ../_snippets/commands/layout/grok.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/keep.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "KEEP"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-keep
+---
+
+# `KEEP` [esql-keep]
+
+:::{include} ../_snippets/commands/layout/keep.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/limit.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "LIMIT"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-limit
+---
+
+# `LIMIT` [esql-limit]
+
+:::{include} ../_snippets/commands/layout/limit.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/lookup-join.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "LOOKUP JOIN"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-lookup-join
+---
+
+# `LOOKUP JOIN` [esql-lookup-join]
+
+:::{include} ../_snippets/commands/layout/lookup-join.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/mv_expand.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "MV_EXPAND"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-mv_expand
+---
+
+# `MV_EXPAND` [esql-mv_expand]
+
+:::{include} ../_snippets/commands/layout/mv_expand.md
+:::

+ 4 - 55
docs/reference/query-languages/esql/commands/processing-commands.md

@@ -1,4 +1,7 @@
 ---
+applies_to:
+  stack:
+  serverless:
 navigation_title: "Processing commands"
 mapped_pages:
   - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html
@@ -15,58 +18,4 @@ mapped_pages:
 {{esql}} supports these processing commands:
 
 :::{include} ../_snippets/lists/processing-commands.md
-:::
-
-:::{include} ../_snippets/commands/layout/change_point.md
-:::
-
-:::{include} ../_snippets/commands/layout/completion.md
-:::
-
-:::{include} ../_snippets/commands/layout/dissect.md
-:::
-
-:::{include} ../_snippets/commands/layout/drop.md
-:::
-
-:::{include} ../_snippets/commands/layout/enrich.md
-:::
-
-:::{include} ../_snippets/commands/layout/eval.md
-:::
-
-:::{include} ../_snippets/commands/layout/fork.md
-:::
-
-:::{include} ../_snippets/commands/layout/grok.md
-:::
-
-:::{include} ../_snippets/commands/layout/keep.md
-:::
-
-:::{include} ../_snippets/commands/layout/limit.md
-:::
-
-:::{include} ../_snippets/commands/layout/lookup-join.md
-:::
-
-:::{include} ../_snippets/commands/layout/mv_expand.md
-:::
-
-:::{include} ../_snippets/commands/layout/rename.md
-:::
-
-:::{include} ../_snippets/commands/layout/rerank.md
-:::
-
-:::{include} ../_snippets/commands/layout/sample.md
-:::
-
-:::{include} ../_snippets/commands/layout/sort.md
-:::
-
-:::{include} ../_snippets/commands/layout/stats-by.md
-:::
-
-:::{include} ../_snippets/commands/layout/where.md
-:::
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/rename.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "RENAME"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-rename
+---
+
+# `RENAME` [esql-rename]
+
+:::{include} ../_snippets/commands/layout/rename.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/rerank.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "RERANK"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-rerank
+---
+
+# `RERANK` [esql-rerank]
+
+:::{include} ../_snippets/commands/layout/rerank.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/row.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "ROW"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-row
+---
+
+# `ROW` [esql-row]
+
+:::{include} ../_snippets/commands/layout/row.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/sample.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "SAMPLE"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-sample
+---
+
+# `SAMPLE` [esql-sample]
+
+:::{include} ../_snippets/commands/layout/sample.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/show.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "SHOW"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-show
+---
+
+# `SHOW` [esql-show]
+
+:::{include} ../_snippets/commands/layout/show.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/sort.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "SORT"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-sort
+---
+
+# `SORT` [esql-sort]
+
+:::{include} ../_snippets/commands/layout/sort.md
+:::

+ 3 - 9
docs/reference/query-languages/esql/commands/source-commands.md

@@ -1,4 +1,7 @@
 ---
+applies_to:
+  stack:
+  serverless:
 navigation_title: "Source commands"
 mapped_pages:
   - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html
@@ -17,12 +20,3 @@ An {{esql}} source command produces a table, typically with data from {{es}}. An
 :::{include} ../_snippets/lists/source-commands.md
 :::
 
-:::{include} ../_snippets/commands/layout/from.md
-:::
-
-:::{include} ../_snippets/commands/layout/row.md
-:::
-
-:::{include} ../_snippets/commands/layout/show.md
-:::
-

+ 10 - 0
docs/reference/query-languages/esql/commands/stats-by.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "STATS"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-stats-by
+---
+
+# `STATS` [esql-stats-by]
+
+:::{include} ../_snippets/commands/layout/stats-by.md
+:::

+ 10 - 0
docs/reference/query-languages/esql/commands/where.md

@@ -0,0 +1,10 @@
+---
+navigation_title: "WHERE"
+mapped_pages:
+  - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-where
+---
+
+# `WHERE` [esql-where]
+
+:::{include} ../_snippets/commands/layout/where.md
+:::

+ 6 - 24
docs/reference/query-languages/esql/esql-commands.md

@@ -1,4 +1,7 @@
 ---
+applies_to:
+  stack:
+  serverless:
 navigation_title: "Commands"
 mapped_pages:
   - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html
@@ -6,28 +9,7 @@ mapped_pages:
 
 # {{esql}} commands [esql-commands]
 
-## Source commands [esql-source-commands]
+{{esql}} commands come in two flavors: source commands and processing commands:
 
-An {{esql}} source command produces a table, typically with data from {{es}}. An {{esql}} query must start with a source command.
-
-:::{image} ../images/source-command.svg
-:alt: A source command producing a table from {{es}}
-:::
-
-{{esql}} supports these source commands:
-
-:::{include} _snippets/lists/source-commands.md
-:::
-
-## Processing commands [esql-processing-commands]
-
-{{esql}} processing commands change an input table by adding, removing, or changing rows and columns.
-
-:::{image} ../images/processing-command.svg
-:alt: A processing command changing an input table
-:::
-
-{{esql}} supports these processing commands:
-
-:::{include} _snippets/lists/processing-commands.md
-:::
+- An {{esql}} query must start with a [source command](./commands/source-commands.md).
+- Use [processing commands](./commands/processing-commands.md) to modify an input table by adding, removing, or transforming rows and columns.

+ 4 - 4
docs/reference/query-languages/esql/esql-enrich-data.md

@@ -6,7 +6,7 @@ mapped_pages:
 
 # Combine data from multiple indices with `ENRICH` [esql-enrich-data]
 
-The {{esql}} [`ENRICH`](/reference/query-languages/esql/commands/processing-commands.md#esql-enrich) processing command combines, at query-time, data from one or more source indexes with field-value combinations found in {{es}} enrich indexes.
+The {{esql}} [`ENRICH`](/reference/query-languages/esql/commands/enrich.md) processing command combines, at query-time, data from one or more source indexes with field-value combinations found in {{es}} enrich indexes.
 
 For example, you can use `ENRICH` to:
 
@@ -14,7 +14,7 @@ For example, you can use `ENRICH` to:
 * Add product information to retail orders based on product IDs
 * Supplement contact information based on an email address
 
-[`ENRICH`](/reference/query-languages/esql/commands/processing-commands.md#esql-enrich) is similar to [`LOOKUP join`](/reference/query-languages/esql/commands/processing-commands.md#esql-lookup-join) in the fact that they both help you join data together. You should use `ENRICH` when:
+[`ENRICH`](/reference/query-languages/esql/commands/enrich.md) is similar to [`LOOKUP join`](/reference/query-languages/esql/commands/lookup-join.md) in the fact that they both help you join data together. You should use `ENRICH` when:
 
 * Enrichment data doesn't change frequently
 * You can accept index-time overhead
@@ -125,7 +125,7 @@ Once the enrich policy is created, you need to execute it using the [execute enr
 The *enrich index* contains documents from the policy’s source indices. Enrich indices always begin with `.enrich-*`, are read-only, and are [force merged](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge).
 
 ::::{warning}
-Enrich indices should only be used by the [enrich processor](/reference/enrich-processor/enrich-processor.md) or the [{{esql}} `ENRICH` command](/reference/query-languages/esql/commands/processing-commands.md#esql-enrich). Avoid using enrich indices for other purposes.
+Enrich indices should only be used by the [enrich processor](/reference/enrich-processor/enrich-processor.md) or the [{{esql}} `ENRICH` command](/reference/query-languages/esql/commands/enrich.md). Avoid using enrich indices for other purposes.
 
 ::::
 
@@ -133,7 +133,7 @@ Enrich indices should only be used by the [enrich processor](/reference/enrich-p
 
 ### Use the enrich policy [esql-use-enrich]
 
-After the policy has been executed, you can use the [`ENRICH` command](/reference/query-languages/esql/commands/processing-commands.md#esql-enrich) to enrich your data.
+After the policy has been executed, you can use the [`ENRICH` command](/reference/query-languages/esql/commands/enrich.md) to enrich your data.
 
 :::{image} ../images/esql-enrich-command.png
 :alt: esql enrich command

+ 4 - 4
docs/reference/query-languages/esql/esql-lookup-join.md

@@ -6,7 +6,7 @@ mapped_pages:
 
 # Join data from multiple indices with `LOOKUP JOIN` [esql-lookup-join-reference]
 
-The {{esql}} [`LOOKUP JOIN`](/reference/query-languages/esql/commands/processing-commands.md#esql-lookup-join) processing command combines data from your {{esql}} query results table with matching records from a specified lookup index. It adds fields from the lookup index as new columns to your results table based on matching values in the join field.
+The {{esql}} [`LOOKUP JOIN`](/reference/query-languages/esql/commands/lookup-join.md) processing command combines data from your {{esql}} query results table with matching records from a specified lookup index. It adds fields from the lookup index as new columns to your results table based on matching values in the join field.
 
 Teams often have data scattered across multiple indices – like logs, IPs, user IDs, hosts, employees etc. Without a direct way to enrich or correlate each event with reference data, root-cause analysis, security checks, and operational insights become time-consuming.
 
@@ -18,7 +18,7 @@ For example, you can use `LOOKUP JOIN` to:
 
 ## Compare with `ENRICH`
 
-[`LOOKUP JOIN`](/reference/query-languages/esql/commands/processing-commands.md#esql-lookup-join) is similar to [`ENRICH`](/reference/query-languages/esql/commands/processing-commands.md#esql-enrich) in the fact that they both help you join data together. You should use `LOOKUP JOIN` when:
+[`LOOKUP JOIN`](/reference/query-languages/esql/commands/lookup-join.md) is similar to [`ENRICH`](/reference/query-languages/esql/commands/enrich.md) in the fact that they both help you join data together. You should use `LOOKUP JOIN` when:
 
 * Your enrichment data changes frequently
 * You want to avoid index-time processing
@@ -141,7 +141,7 @@ A successful query will output a table. In this example, you can see that the `s
 
 ### Additional examples
 
-Refer to the examples section of the [`LOOKUP JOIN`](/reference/query-languages/esql/commands/processing-commands.md#esql-lookup-join) command reference for more examples.
+Refer to the examples section of the [`LOOKUP JOIN`](/reference/query-languages/esql/commands/lookup-join.md) command reference for more examples.
 
 ## Prerequisites [esql-lookup-join-prereqs]
 
@@ -175,7 +175,7 @@ In addition to the [{{esql}} unsupported field types](/reference/query-languages
 * Temporal intervals like `DURATION`, `PERIOD`
 
 ```{note}
-For a complete list of all types supported in `LOOKUP JOIN`, refer to the [`LOOKUP JOIN` supported types table](/reference/query-languages/esql/commands/processing-commands.md#esql-lookup-join).
+For a complete list of all types supported in `LOOKUP JOIN`, refer to the [`LOOKUP JOIN` supported types table](/reference/query-languages/esql/commands/lookup-join.md).
 ```
 
 ## Usage notes

+ 1 - 1
docs/reference/query-languages/esql/esql-metadata-fields.md

@@ -8,7 +8,7 @@ mapped_pages:
 
 {{esql}} can access [metadata fields](/reference/elasticsearch/mapping-reference/document-metadata-fields.md).
 
-To access these fields, use the `METADATA` directive with the [`FROM`](/reference/query-languages/esql/commands/source-commands.md#esql-from) source command. For example:
+To access these fields, use the `METADATA` directive with the [`FROM`](/reference/query-languages/esql/commands/from.md) source command. For example:
 
 ```esql
 FROM index METADATA _index, _id

+ 3 - 3
docs/reference/query-languages/esql/esql-process-data-with-dissect-grok.md

@@ -13,7 +13,7 @@ Your data may contain unstructured strings that you want to structure. This make
 :alt: unstructured data
 :::
 
-{{es}} can structure your data at index time or query time. At index time, you can use the [Dissect](/reference/enrich-processor/dissect-processor.md) and [Grok](/reference/enrich-processor/grok-processor.md) ingest processors, or the {{ls}} [Dissect](logstash-docs-md://lsr//plugins-filters-dissect.md) and [Grok](logstash-docs-md://lsr//plugins-filters-grok.md) filters. At query time, you can use the {{esql}} [`DISSECT`](/reference/query-languages/esql/commands/processing-commands.md#esql-dissect) and [`GROK`](/reference/query-languages/esql/commands/processing-commands.md#esql-grok) commands.
+{{es}} can structure your data at index time or query time. At index time, you can use the [Dissect](/reference/enrich-processor/dissect-processor.md) and [Grok](/reference/enrich-processor/grok-processor.md) ingest processors, or the {{ls}} [Dissect](logstash-docs-md://lsr//plugins-filters-dissect.md) and [Grok](logstash-docs-md://lsr//plugins-filters-grok.md) filters. At query time, you can use the {{esql}} [`DISSECT`](/reference/query-languages/esql/commands/dissect.md) and [`GROK`](/reference/query-languages/esql/commands/grok.md) commands.
 
 ## `DISSECT` or `GROK`? Or both? [esql-grok-or-dissect]
 
@@ -24,7 +24,7 @@ You can use both `DISSECT` and `GROK` for hybrid use cases. For example when a s
 
 ## Process data with `DISSECT` [esql-process-data-with-dissect]
 
-The [`DISSECT`](/reference/query-languages/esql/commands/processing-commands.md#esql-dissect) processing command matches a string against a delimiter-based pattern, and extracts the specified keys as columns.
+The [`DISSECT`](/reference/query-languages/esql/commands/dissect.md) processing command matches a string against a delimiter-based pattern, and extracts the specified keys as columns.
 
 For example, the following pattern:
 
@@ -206,7 +206,7 @@ The `DISSECT` command does not support reference keys.
 
 ## Process data with `GROK` [esql-process-data-with-grok]
 
-The [`GROK`](/reference/query-languages/esql/commands/processing-commands.md#esql-grok) processing command matches a string against a pattern based on regular expressions, and extracts the specified keys as columns.
+The [`GROK`](/reference/query-languages/esql/commands/grok.md) processing command matches a string against a pattern based on regular expressions, and extracts the specified keys as columns.
 
 For example, the following pattern:
 

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

@@ -7,7 +7,7 @@ mapped_pages:
 # {{esql}} aggregation functions [esql-aggregation-functions]
 
 
-The [`STATS`](/reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) command supports these aggregate functions:
+The [`STATS`](/reference/query-languages/esql/commands/stats-by.md) command supports these aggregate functions:
 
 :::{include} ../_snippets/lists/aggregation-functions.md
 :::

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

@@ -7,7 +7,7 @@ mapped_pages:
 # {{esql}} grouping functions [esql-group-functions]
 
 
-The [`STATS`](/reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) command supports these grouping functions:
+The [`STATS`](/reference/query-languages/esql/commands/stats-by.md) command supports these grouping functions:
 
 :::{include} ../_snippets/lists/grouping-functions.md
 :::

+ 8 - 8
docs/reference/query-languages/esql/limitations.md

@@ -8,7 +8,7 @@ mapped_pages:
 
 ## Result set size limit [esql-max-rows]
 
-By default, an {{esql}} query returns up to 1,000 rows. You can increase the number of rows up to 10,000 using the [`LIMIT`](/reference/query-languages/esql/commands/processing-commands.md#esql-limit) command.
+By default, an {{esql}} query returns up to 1,000 rows. You can increase the number of rows up to 10,000 using the [`LIMIT`](/reference/query-languages/esql/commands/limit.md) command.
 
 :::{include} _snippets/common/result-set-size-limitation.md
 :::
@@ -85,7 +85,7 @@ Querying a column with an unsupported type returns an error. If a column with an
 
 Some [field types](/reference/elasticsearch/mapping-reference/field-data-types.md) are not supported in all contexts:
 
-* Spatial types are not supported in the [SORT](/reference/query-languages/esql/commands/processing-commands.md#esql-sort) processing command. Specifying a column of one of these types as a sort parameter will result in an error:
+* Spatial types are not supported in the [SORT](/reference/query-languages/esql/commands/sort.md) processing command. Specifying a column of one of these types as a sort parameter will result in an error:
 
     * `geo_point`
     * `geo_shape`
@@ -104,8 +104,8 @@ In addition, when [querying multiple indexes](docs-content://explore-analyze/que
 
 One limitation of [full-text search](/reference/query-languages/esql/functions-operators/search-functions.md) is that it is necessary to use the search function,
 like [`MATCH`](/reference/query-languages/esql/functions-operators/search-functions.md#esql-match),
-in a [`WHERE`](/reference/query-languages/esql/commands/processing-commands.md#esql-where) command directly after the
-[`FROM`](/reference/query-languages/esql/commands/source-commands.md#esql-from) source command, or close enough to it.
+in a [`WHERE`](/reference/query-languages/esql/commands/where.md) command directly after the
+[`FROM`](/reference/query-languages/esql/commands/from.md) source command, or close enough to it.
 Otherwise, the query will fail with a validation error.
 
 For example, this query is valid:
@@ -115,7 +115,7 @@ FROM books
 | WHERE MATCH(author, "Faulkner") AND MATCH(author, "Tolkien")
 ```
 
-But this query will fail due to the [STATS](/reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) command:
+But this query will fail due to the [STATS](/reference/query-languages/esql/commands/stats-by.md) command:
 
 ```esql
 FROM books
@@ -179,7 +179,7 @@ Or consider using one of the [full-text search](/reference/query-languages/esql/
 
 As discussed in more detail in [Using {{esql}} to query multiple indices](docs-content://explore-analyze/query-filter/languages/esql-multi-index.md), {{esql}} can execute a single query across multiple indices, data streams, or aliases. However, there are some limitations to be aware of:
 
-* All underlying indexes and shards must be active. Using admin commands or UI, it is possible to pause an index or shard, for example by disabling a frozen tier instance, but then any {{esql}} query that includes that index or shard will fail, even if the query uses [`WHERE`](/reference/query-languages/esql/commands/processing-commands.md#esql-where) to filter out the results from the paused index. If you see an error of type `search_phase_execution_exception`, with the message `Search rejected due to missing shards`, you likely have an index or shard in `UNASSIGNED` state.
+* All underlying indexes and shards must be active. Using admin commands or UI, it is possible to pause an index or shard, for example by disabling a frozen tier instance, but then any {{esql}} query that includes that index or shard will fail, even if the query uses [`WHERE`](/reference/query-languages/esql/commands/where.md) to filter out the results from the paused index. If you see an error of type `search_phase_execution_exception`, with the message `Search rejected due to missing shards`, you likely have an index or shard in `UNASSIGNED` state.
 * The same field must have the same type across all indexes. If the same field is mapped to different types it is still possible to query the indexes, but the field must be [explicitly converted to a single type](docs-content://explore-analyze/query-filter/languages/esql-multi-index.md#esql-multi-index-union-types).
 
 
@@ -244,11 +244,11 @@ Work around this limitation by converting the field to single value with one of
 
 ## Kibana limitations [esql-limitations-kibana]
 
-* The user interface to filter data is not enabled when Discover is in {{esql}} mode. To filter data, write a query that uses the [`WHERE`](/reference/query-languages/esql/commands/processing-commands.md#esql-where) command instead.
+* The user interface to filter data is not enabled when Discover is in {{esql}} mode. To filter data, write a query that uses the [`WHERE`](/reference/query-languages/esql/commands/where.md) command instead.
 * Discover shows no more than 10,000 rows. This limit only applies to the number of rows that are retrieved by the query and displayed in Discover. Queries and aggregations run on the full data set.
 * Discover shows no more than 50 columns. If a query returns more than 50 columns, Discover only shows the first 50.
 * CSV export from Discover shows no more than 10,000 rows. This limit only applies to the number of rows that are retrieved by the query and displayed in Discover. Queries and aggregations run on the full data set.
-* Querying many indices at once without any filters can cause an error in kibana which looks like `[esql] > Unexpected error from Elasticsearch: The content length (536885793) is bigger than the maximum allowed string (536870888)`. The response from {{esql}} is too long. Use [`DROP`](/reference/query-languages/esql/commands/processing-commands.md#esql-drop) or [`KEEP`](/reference/query-languages/esql/commands/processing-commands.md#esql-keep) to limit the number of fields returned.
+* Querying many indices at once without any filters can cause an error in kibana which looks like `[esql] > Unexpected error from Elasticsearch: The content length (536885793) is bigger than the maximum allowed string (536870888)`. The response from {{esql}} is too long. Use [`DROP`](/reference/query-languages/esql/commands/drop.md) or [`KEEP`](/reference/query-languages/esql/commands/keep.md) to limit the number of fields returned.
 
 ## Known issues [esql-known-issues]
 

+ 23 - 0
docs/reference/query-languages/toc.yml

@@ -90,7 +90,30 @@ toc:
           - file: esql/esql-commands.md
             children:
               - file: esql/commands/source-commands.md
+                children:
+                  - file: esql/commands/from.md
+                  - file: esql/commands/row.md
+                  - file: esql/commands/show.md
               - file: esql/commands/processing-commands.md
+                children:
+                  - file: esql/commands/change-point.md
+                  - file: esql/commands/completion.md
+                  - file: esql/commands/dissect.md
+                  - file: esql/commands/drop.md
+                  - file: esql/commands/enrich.md
+                  - file: esql/commands/eval.md
+                  - file: esql/commands/fork.md
+                  - file: esql/commands/grok.md
+                  - file: esql/commands/keep.md
+                  - file: esql/commands/limit.md
+                  - file: esql/commands/lookup-join.md
+                  - file: esql/commands/mv_expand.md
+                  - file: esql/commands/rename.md
+                  - file: esql/commands/rerank.md
+                  - file: esql/commands/sample.md
+                  - file: esql/commands/sort.md
+                  - file: esql/commands/stats-by.md
+                  - file: esql/commands/where.md
           - file: esql/esql-functions-operators.md
             children:
               - file: esql/functions-operators/aggregation-functions.md

+ 1 - 1
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Count.java

@@ -55,7 +55,7 @@ public class Count extends AggregateFunction implements ToAggregator, SurrogateE
             ),
             @Example(
                 description = "To count the number of times an expression returns `TRUE` use "
-                    + "a <<esql-where>> command to remove rows that shouldn’t be included",
+                    + "a [`WHERE`](/reference/query-languages/esql/commands/where.md) command to remove rows that shouldn’t be included",
                 file = "stats",
                 tag = "count-where"
             ),

+ 2 - 2
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/grouping/Bucket.java

@@ -132,7 +132,7 @@ public class Bucket extends GroupingFunction.EvaluatableGroupingFunction
                     ::::{note}
                     `BUCKET` does not filter any rows. It only uses the provided range to pick a good bucket size.
                     For rows with a value outside of the range, it returns a bucket value that corresponds to a bucket outside the range.
-                    Combine `BUCKET` with <<esql-where>> to filter rows.
+                    Combine `BUCKET` with [`WHERE`](/reference/query-languages/esql/commands/where.md) to filter rows.
                     ::::"""
             ),
             @Example(description = """
@@ -166,7 +166,7 @@ public class Bucket extends GroupingFunction.EvaluatableGroupingFunction
             @Example(
                 description = """
                     `BUCKET` may be used in both the aggregating and grouping part of the
-                    <<esql-stats-by, STATS ... BY ...>> command provided that in the aggregating
+                    [STATS ... BY ...](/reference/query-languages/esql/commands/stats-by.md) command provided that in the aggregating
                     part the function is referenced by an alias defined in the
                     grouping part, or that it is invoked with the exact same expression:""",
                 file = "bucket",

+ 3 - 2
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateTrunc.java

@@ -66,8 +66,9 @@ public class DateTrunc extends EsqlScalarFunction {
         examples = {
             @Example(file = "date", tag = "docsDateTrunc"),
             @Example(
-                description = "Combine `DATE_TRUNC` with <<esql-stats-by>> to create date histograms. For\n"
-                    + "example, the number of hires per year:",
+                description = "Combine `DATE_TRUNC` with [`STATS`](/reference/query-languages/esql/commands/stats-by.md) "
+                    + "to create date histograms. "
+                    + "For example, the number of hires per year:",
                 file = "date",
                 tag = "docsDateTruncHistogram"
             ),