Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{applies_to}`stack: ga 9.1` Inside quotes, Console suggests possible commands and functions to autocomplete your query:

:::{image} /explore-analyze/images/console-esql-autocomplete.png
:alt: Console shows ES|QL autocomplete suggestions
:::
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Discover suggests possible commands and functions to autocomplete your query:

:::{image} /explore-analyze/images/elasticsearch-reference-esql-kibana-auto-complete.png
:alt: esql kibana auto complete
:::
10 changes: 5 additions & 5 deletions explore-analyze/query-filter/languages/esql-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,13 @@ Enter the actual {{esql}} query between the two sets of triple quotes. For examp
POST /_query?format=txt
{
"query": """
FROM sample_data
FROM kibana_sample_data_logs
"""
}
```
:::{include} /explore-analyze/query-filter/_snippets/console-esql-autocomplete.md
:::

::::::

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

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.

To make it easier to write queries, auto-complete offers suggestions with possible commands and functions:

:::{image} /explore-analyze/images/elasticsearch-reference-esql-kibana-auto-complete.png
:alt: esql kibana auto complete
:::{include} /explore-analyze/query-filter/_snippets/discover-esql-autocomplete.md
:::

You can adjust the editor’s height by dragging its bottom border to your liking.
Expand Down
8 changes: 2 additions & 6 deletions explore-analyze/query-filter/languages/esql-kibana.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ A source command can be followed by one or more [processing commands](elasticsea
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.
::::


To make it easier to write queries, auto-complete offers suggestions with possible commands and functions:

:::{image} /explore-analyze/images/elasticsearch-reference-esql-kibana-auto-complete.png
:alt: esql kibana auto complete
:::{include} /explore-analyze/query-filter/_snippets/discover-esql-autocomplete.md
:::

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

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

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.
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.

:::{image} /explore-analyze/images/elasticsearch-reference-esql-kibana-enrich-autocomplete.png
:alt: esql kibana enrich autocomplete
Expand Down
7 changes: 4 additions & 3 deletions explore-analyze/query-filter/languages/esql-rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ James S.A. Corey |Leviathan Wakes |561 |2011-06-02T00:00:00.000Z
```


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

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:
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:

```console
POST /_query?format=txt
Expand All @@ -54,7 +54,8 @@ POST /_query?format=txt
"""
}
```

:::{include} /explore-analyze/query-filter/_snippets/console-esql-autocomplete.md
:::

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

Expand Down
4 changes: 1 addition & 3 deletions explore-analyze/query-filter/tools/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ products:

# Run API requests with Console [console-kibana]

$$$configuring-console$$$

$$$import-export-console-requests$$$


Expand Down Expand Up @@ -72,7 +70,7 @@ GET kbn:/api/index_management/indices

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.

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


### Comments [console-comments]
Expand Down
Loading