Skip to content

Commit 24be8f9

Browse files
authored
Add docs for ES|QL autocomplete in Console (#2454)
This PR includes the following changes: - Docs for ES|QL autocomplete in Console - Consistency edits for mentions of ES|QL autocomplete in Discover - General edits for style + one link fix I'll make the same changes in 8.19 when this is approved. Closes: #1732, elastic/kibana#223923
1 parent 832cd31 commit 24be8f9

File tree

7 files changed

+22
-17
lines changed

7 files changed

+22
-17
lines changed
184 KB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{applies_to}`stack: ga 9.1` Inside quotes, Console suggests possible commands and functions to autocomplete your query:
2+
3+
:::{image} /explore-analyze/images/console-esql-autocomplete.png
4+
:alt: Console shows ES|QL autocomplete suggestions
5+
:::
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Discover suggests possible commands and functions to autocomplete your query:
2+
3+
:::{image} /explore-analyze/images/elasticsearch-reference-esql-kibana-auto-complete.png
4+
:alt: esql kibana auto complete
5+
:::

explore-analyze/query-filter/languages/esql-getting-started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,13 @@ Enter the actual {{esql}} query between the two sets of triple quotes. For examp
8787
POST /_query?format=txt
8888
{
8989
"query": """
90-
FROM sample_data
90+
FROM kibana_sample_data_logs
9191
"""
9292
}
9393
```
94+
:::{include} /explore-analyze/query-filter/_snippets/console-esql-autocomplete.md
95+
:::
96+
9497
::::::
9598

9699
::::::{tab-item} Discover
@@ -100,10 +103,7 @@ Adjust the time filter so it includes the timestamps in the sample data (October
100103

101104
After switching to {{esql}} mode, the query bar shows a sample query. You can replace this query with the queries in this getting started guide.
102105

103-
To make it easier to write queries, auto-complete offers suggestions with possible commands and functions:
104-
105-
:::{image} /explore-analyze/images/elasticsearch-reference-esql-kibana-auto-complete.png
106-
:alt: esql kibana auto complete
106+
:::{include} /explore-analyze/query-filter/_snippets/discover-esql-autocomplete.md
107107
:::
108108

109109
You can adjust the editor’s height by dragging its bottom border to your liking.

explore-analyze/query-filter/languages/esql-kibana.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ A source command can be followed by one or more [processing commands](elasticsea
5252
Click the **ES|QL help** button to open the in-product reference documentation for all commands and functions or to get recommended queries that will help you get started.
5353
::::
5454

55-
56-
To make it easier to write queries, auto-complete offers suggestions with possible commands and functions:
57-
58-
:::{image} /explore-analyze/images/elasticsearch-reference-esql-kibana-auto-complete.png
59-
:alt: esql kibana auto complete
55+
:::{include} /explore-analyze/query-filter/_snippets/discover-esql-autocomplete.md
6056
:::
6157

6258
::::{note}
@@ -279,7 +275,7 @@ You can also [Add dashboard controls from your ES|QL visualization's query](/exp
279275

280276
## Create an enrich policy [esql-kibana-enrich]
281277

282-
The {{esql}} [`ENRICH`](elasticsearch://reference/query-languages/esql/commands/processing-commands.md#esql-enrich) command enables you to [enrich](elasticsearch://reference/query-languages/esql/esql-enrich-data.md) your query dataset with fields from another dataset. Before you can use `ENRICH`, you need to [create and execute an enrich policy](elasticsearch://reference/query-languages/esql/esql-enrich-data.md#esql-set-up-enrich-policy). If a policy exists, it will be suggested by auto-complete. If not, click **Click to create** to create one.
278+
The {{esql}} [`ENRICH`](elasticsearch://reference/query-languages/esql/commands/processing-commands.md#esql-enrich) command enables you to [enrich](elasticsearch://reference/query-languages/esql/esql-enrich-data.md) your query dataset with fields from another dataset. Before you can use `ENRICH`, you need to [create and execute an enrich policy](elasticsearch://reference/query-languages/esql/esql-enrich-data.md#esql-set-up-enrich-policy). If a policy exists, it will be suggested by autocomplete. If not, click **Click to create** to create one.
283279

284280
:::{image} /explore-analyze/images/elasticsearch-reference-esql-kibana-enrich-autocomplete.png
285281
:alt: esql kibana enrich autocomplete

explore-analyze/query-filter/languages/esql-rest.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ James S.A. Corey |Leviathan Wakes |561 |2011-06-02T00:00:00.000Z
3939
```
4040

4141

42-
### Kibana Console [esql-kibana-console]
42+
### Run the {{esql}} query API in Console [esql-kibana-console]
4343

44-
If you are using [Kibana Console](/explore-analyze/query-filter/tools/console.md) (which is highly recommended), take advantage of the triple quotes `"""` when creating the query. This not only automatically escapes double quotes (`"`) inside the query string but also supports multi-line requests:
44+
We recommend using [Console](/explore-analyze/query-filter/tools/console.md) to run the {{esql}} query API. When creating the query, using triple quotes (`"""`) allows you to use special characters like quotes (`"`) without having to escape them. They also make it easier to write multi-line requests:
4545

4646
```console
4747
POST /_query?format=txt
@@ -54,7 +54,8 @@ POST /_query?format=txt
5454
"""
5555
}
5656
```
57-
57+
:::{include} /explore-analyze/query-filter/_snippets/console-esql-autocomplete.md
58+
:::
5859

5960
### Response formats [esql-rest-format]
6061

explore-analyze/query-filter/tools/console.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ products:
1515

1616
# Run API requests with Console [console-kibana]
1717

18-
$$$configuring-console$$$
19-
2018
$$$import-export-console-requests$$$
2119

2220

@@ -72,7 +70,7 @@ GET kbn:/api/index_management/indices
7270

7371
When you’re typing a command, **Console** makes context-sensitive suggestions. These suggestions show you the parameters for each API and speed up your typing.
7472

75-
You can configure your preferences for autocomplete in the [Console settings](../../../explore-analyze/query-filter/tools/console.md#configuring-console).
73+
You can configure your preferences for autocomplete in the [Console settings](#configuring-console).
7674

7775

7876
### Comments [console-comments]

0 commit comments

Comments
 (0)