[DOCS] Update ESQL docs (#183617)

Related PR:
https://github.com/elastic/elasticsearch/pull/108715#issuecomment-2114866817
This commit is contained in:
Liam Thompson 2024-05-17 14:50:05 +02:00 committed by GitHub
parent 01cb16838d
commit 4c56567ece
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 19 deletions

View file

@ -1,23 +1,36 @@
[[esql]]
=== {esql}
preview::["Do not use {esql} 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."]
The Elasticsearch Query Language, {esql}, makes it faster and easier to explore your data.
The Elasticsearch Query Language, {esql}, has been created to make exploring your data faster and easier using the **Discover** application. From version 8.11 you can try this new feature, which is enabled by default.
{esql} is a piped language which allows you to chain together multiple commands to query your data.
Based on the query, Lens suggestions in Discover create a visualization of the query results.
{esql} comes with its own dedicated {esql} Compute Engine for greater efficiency. With one query you can search, aggregate, calculate and perform data transformations without leaving **Discover**. Write your query directly in **Discover** or use the **Dev Tools** with the {ref}/esql-rest.html[{esql} API].
Here's how to use {esql} in the data view selector in **Discover**:
[role="screenshot"]
image:images/esql-data-view-menu.png[An image of the Discover UI where users can access the {esql} feature, width=30%]
This new piped language allows you to chain together multiple commands to query your data. Based on the query, Lens suggestions in Discover create a visualization of the query results.
{esql} comes with its own dedicated {esql} Compute Engine for greater efficiency. From one query you can search, aggregate, calculate and perform data transformations without leaving **Discover**. Write your query directly in **Discover** or use the **Dev Tools** with the {ref}/esql-rest.html[{esql} API].
image:images/esql-data-view-menu.png[An image of the Discover UI where users can access the {esql} feature, width=30%, align="center"]
{esql} also features in-app help, so you can get started faster and don't have to leave the application to check syntax.
[role="screenshot"]
image:images/esql-in-app-help.png[An image of the Discover UI where users can browse the in-app help]
For more detailed information about the {esql} language, refer to {ref}/esql-language.html[Learning {esql}].
You can also use ES|QL queries to create panels on your dashboards, create enrich policies, and create alerting rules.
For more detailed information about {esql} in Kibana, refer to {ref}/esql-kibana.html[Using {esql} in {kib}].
[NOTE]
====
{esql} is enabled by default in {kib}. It can be
disabled using the `enableESQL` setting from the
{kibana-ref}/advanced-options.html[Advanced Settings].
This will hide the {esql} user interface from various applications.
However, users will be able to access existing {esql} artifacts like saved searches and visualizations.
====
[float]
[[esql-observability]]
@ -35,6 +48,6 @@ Use {esql} to retrieve important information for investigation by using lookups.
[[esql-whats-next]]
==== What's next?
Full documentation for this language is available in the {es} documentation, refer to {ref}/esql.html[{esql}].
The main documentation for {esql} lives in the {ref}/esql.html[{es} docs].
Alternatively, a short tutorial is available in the **Discover** section <<try-esql, Try {esql}L>>.
We also have a short tutorial in the **Discover** docs: <<try-esql,Using {esql}>>.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 572 KiB

Before After
Before After

View file

@ -1,5 +1,5 @@
[[try-esql]]
== Try {esql}
== Using {esql}
The Elasticsearch Query Language, {esql}, makes it easier to explore your data without leaving Discover.
@ -9,11 +9,11 @@ In this tutorial we'll use the {kib} sample web logs in Discover and Lens to exp
[[prerequisite]]
=== Prerequisite
To be able to select **Try {esql}** from the Data views menu the `enableESQL` setting must be enabled from **Stack Management > Advanced Settings**. It is enabled by default.
To be able to select **Language {esql}** from the Data views menu the `enableESQL` setting must be enabled from **Stack Management > Advanced Settings**. It is enabled by default.
[float]
[[tutorial-try-esql]]
=== Trying {esql}
=== Use {esql}
To load the sample data:
@ -21,7 +21,7 @@ To load the sample data:
. Click **Other sample data sets**.
. On the Sample web logs card, click **Add data**.
. Open the main menu and select *Discover*.
. From the Data views menu, select *Try {esql}*.
. From the Data views menu, select *Language {esql}*.
Let's say we want to find out what operating system users have and how much RAM is on their machine.
@ -36,7 +36,7 @@ FROM kibana_sample_data_logs
| KEEP machine.os, machine.ram
----
+
. Click **Update**.
. Click **▶Run**.
+
[role="screenshot"]
image:images/esql-machine-os-ram.png[An image of the query result]
@ -57,7 +57,7 @@ FROM kibana_sample_data_logs
| LIMIT 10
----
+
. Click **Update**.
. Click **▶Run**.
+
[role="screenshot"]
image:images/esql-limit.png[An image of the extended query result]
@ -75,7 +75,7 @@ FROM kibana_sample_data_logs
| LIMIT 10
----
+
. Click **Update**.
. Click **▶Run**.
+
[role="screenshot"]
image:images/esql-full-query.png[]
@ -84,6 +84,9 @@ image:images/esql-full-query.png[]
To make changes to the visualization you can use the visualization drop-down. To make changes to the colors used or the axes, or click the pencil icon. This opens an in-line editor where you can change the colors and axes of the visualization.
To learn more about {esql}, try other tutorials, see more examples and reference material, refer to {ref}/esql.html[{esql}].
[TIP]
====
For the complete {esql} documentation, including tutorials, examples and the full syntax reference, refer to the {ref}/esql.html[{es} documentation].
For a more detailed overview of {esql} in {kib}, refer to {ref}/esql-kibana.html[Use {esql} in Kibana].
====