Skip to content

Commit

Permalink
[DOCS] Update ESQL docs (elastic#183617)
Browse files Browse the repository at this point in the history
  • Loading branch information
leemthompo authored May 17, 2024
1 parent 01cb168 commit 4c56567
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 18 deletions.
31 changes: 22 additions & 9 deletions docs/concepts/esql.asciidoc
Original file line number Diff line number Diff line change
@@ -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.

[role="screenshot"]
image:images/esql-data-view-menu.png[An image of the Discover UI where users can access the {esql} feature, width=30%]
{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].

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.
Here's how to use {esql} in the data view selector in **Discover**:

{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].
[role="screenshot"]
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]]
Expand All @@ -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 modified docs/concepts/images/esql-data-view-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/concepts/images/esql-in-app-help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 12 additions & 9 deletions docs/discover/try-esql.asciidoc
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -9,19 +9,19 @@ 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:

. On the home page, click **Try 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.

Expand All @@ -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]
Expand All @@ -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]
Expand All @@ -75,7 +75,7 @@ FROM kibana_sample_data_logs
| LIMIT 10
----
+
. Click **Update**.
. Click **▶Run**.
+
[role="screenshot"]
image:images/esql-full-query.png[]
Expand All @@ -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].
====

0 comments on commit 4c56567

Please sign in to comment.