You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# [๐๏ธ | ๐๏ธ URL
preview](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/1228/explore-analyze/query-filter/languages/esql)
Mainly cosmetic, but should improve the UX for users landing in
**Explore & Analyze** for ESQL:
Rough summary:
- removed gerund forms ("using", "getting") from all titles
- shortened, edited navigation titles where necessary
- added two new parent pages (esql-where.md, esql-multi.md) for logical
grouping
- updated toc.yml to reflect new hierarchical structure
- marked cross-clusters feature as unavailable for serverless
- expanded esql landing page with clearer structure and examples
- reorganized reference documentation into visual groups
- added section on user interfaces with programmatic vs interactive
options
- added more cross-links between related docs
- improved consistency in capitalization and terminology
## Nav before
<img width="234" alt="Screenshot 2025-04-22 at 16 09 25"
src="https://github.com/user-attachments/assets/a989d476-5e50-4906-8f0b-77770d0aca2e"
/>
## Nav after
<img width="255" alt="Screenshot 2025-04-22 at 16 09 51"
src="https://github.com/user-attachments/assets/5f5261a4-fbd3-4c6a-84c1-7fdfd68ef2b2"
/>
# Using ES|QL in Elastic Security [esql-elastic-security]
13
-
10
+
# Use ES|QL in {{elastic-sec}} [esql-elastic-security]
14
11
15
12
You can use {{esql}} in {{elastic-sec}} to investigate events in Timeline and create detection rules. Use the Elastic AI Assistant to build {{esql}} queries, or answer questions about the {{esql}} query language.
# Using ES|QL to query multiple indices [esql-multi-index]
13
-
10
+
# Use ES|QL to query multiple indices [esql-multi-index]
14
11
15
12
With {{esql}}, you can execute a single query across multiple indices, data streams, or aliases. To do so, use wildcards and date arithmetic. The following example uses a comma-separated list and a wildcard:
**Elasticsearch Query Language ({{esql}})** is a piped query language for filtering, transforming, and analyzing data.
14
13
15
14
## What's {{esql}}? [_the_esql_compute_engine]
16
15
17
-
**Elasticsearch Query Language ({{esql}})** is a piped query language for filtering, transforming, and analyzing data.
16
+
You can author {{esql}} queries to find specific events, perform statistical analysis, and create visualizations. It supports a wide range of commands, functions, and operators to perform various data operations, such as filter, aggregation, time-series analysis, and more. It initially supported a subset of the features available in Query DSL, but it is rapidly evolving with every {{serverless-full}} and Stack release.
18
17
19
-
You can author {{esql}} queries to find specific events, perform statistical analysis, and generate visualizations. It supports a wide range of [commands](elasticsearch://reference/query-languages/esql/esql-commands.md), [functions, and operators](elasticsearch://reference/query-languages/esql/esql-functions-operators.md) to perform various data operations, such as filtering, aggregation, time-series analysis, and more. Today, it supports a subset of the features available in Query DSL, but it is rapidly evolving.
18
+
{{esql}} is designed to be easy to read and write, making it accessible for users with varying levels of technical expertise. It is particularly useful for data analysts, security professionals, and developers who need to work with large datasets in Elasticsearch.
20
19
21
-
::::{note}
22
-
**{{esql}}'s compute architecture**
20
+
## How does it work? [search-analyze-data-esql]
23
21
24
-
{{esql}} is built on top of a new compute architecture within {{es}}, designed to achieve high functional and performance requirements for {{esql}}. {{esql}} search, aggregation, and transformation functions are directly executed within Elasticsearch itself. Query expressions are not transpiled to Query DSL for execution. This approach allows {{esql}} to be extremely performant and versatile.
22
+
{{esql}} uses pipes (`|`) to manipulate and transform data in a step-by-step fashion. This approach allows you to compose a series of operations, where the output of one operation becomes the input for the next, enabling complex data transformations and analysis.
25
23
26
-
The new {{esql}} execution engine was designed with performance in mind โ it operates on blocks at a time instead of per row, targets vectorization and cache locality, and embraces specialization and multi-threading. It is a separate component from the existing Elasticsearch aggregation framework with different performance characteristics.
27
-
::::
24
+
Here's a simple example of an {{esql}} query:
28
25
29
-
## How does it work? [search-analyze-data-esql]
26
+
```esql
27
+
FROM sample_data
28
+
| SORT @timestamp DESC
29
+
| LIMIT 3
30
+
```
31
+
32
+
Note that each line in the query represents a step in the data processing pipeline:
33
+
- The `FROM` clause specifies the index or data stream to query
34
+
- The `SORT` clause sorts the data by the `@timestamp` field in descending order
35
+
- The `LIMIT` clause restricts the output to the top 3 results
30
36
31
-
The {{es}} Query Language ({{esql}}) makes use of "pipes" (|) to manipulate and transform data in a step-by-step fashion. This approach allows you to compose a series of operations, where the output of one operation becomes the input for the next, enabling complex data transformations and analysis.
37
+
### User interfaces
32
38
33
-
You can use it:
34
-
- In your queries to {{es}} APIs, using the [`_query` endpoint](/explore-analyze/query-filter/languages/esql-rest.md) that accepts queries written in {{esql}} syntax.
35
-
- Within various {{kib}} tools such as Discover and Dashboards, to explore your data and build powerful visualizations.
39
+
You can interact with {{esql}} in two ways:
36
40
37
-
Learn more about using {{esql}} for Search use cases in this tutorial: [Search and filter with {{esql}}](/solutions/search/esql-search-tutorial.md).
41
+
-**Programmatic access**: Use {{esql}} syntax with the {{es}} `_query` endpoint.
38
42
39
-
## Next steps
43
+
-**Interactive interfaces**: Work with {{esql}} through Elastic user interfaces including Kibana Discover, Dashboards, Dev Tools, and analysis tools in Elastic Security and Observability.
40
44
41
-
Find more details about {{esql}} in the following documentation pages:
- Reference documentation for the [{{esql}} syntax](elasticsearch://reference/query-languages/esql/esql-syntax.md):
44
-
- Reference for [commands](elasticsearch://reference/query-languages/esql/esql-commands.md), and [functions and operators](elasticsearch://reference/query-languages/esql/esql-functions-operators.md)
45
-
- How to work with [metadata fields](elasticsearch://reference/query-languages/esql/esql-metadata-fields.md) and [multivalued fields](elasticsearch://reference/query-languages/esql/esql-multivalued-fields.md)
46
-
- How to work with [DISSECT and GROK](elasticsearch://reference/query-languages/esql/esql-process-data-with-dissect-grok.md), [ENRICH](elasticsearch://reference/query-languages/esql/esql-enrich-data.md), and [LOOKUP join](elasticsearch://reference/query-languages/esql/esql-lookup-join.md)
45
+
## Documentation
47
46
47
+
### Usage guides
48
+
-**Get started**
49
+
-[Get started in docs](/explore-analyze/query-filter/languages/esql-getting-started.md)
{{esql}} is built on top of a new compute architecture within {{es}}, designed to achieve high functional and performance requirements for {{esql}}. {{esql}} search, aggregation, and transformation functions are directly executed within Elasticsearch itself. Query expressions are not transpiled to Query DSL for execution. This approach allows {{esql}} to be extremely performant and versatile.
92
+
93
+
The new {{esql}} execution engine was designed with performance in mind โ it operates on blocks at a time instead of per row, targets vectorization and cache locality, and embraces specialization and multi-threading. It is a separate component from the existing Elasticsearch aggregation framework with different performance characteristics.
0 commit comments