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
Copy file name to clipboardExpand all lines: docs/reference/esql.md
+7-21Lines changed: 7 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,13 @@ mapped_pages:
6
6
7
7
# ES|QL in the .NET client [esql]
8
8
9
-
10
9
This page helps you understand and use [ES|QL](docs-content://explore-analyze/query-filter/languages/esql.md) in the .NET client.
11
10
12
-
There are two ways to use ES|QL in the .NET client:
11
+
The recommended way to work with ES|QL is the [LINQ to ES|QL](linq-to-esql.md) provider, which lets you write type-safe C# LINQ queries that are automatically translated to ES|QL at runtime.
13
12
14
-
* Use the Elasticsearch [ES|QL API](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-esql) directly: This is the most flexible approach, but it’s also the most complex because you must handle results in their raw form. You can choose the precise format of results, such as JSON, CSV, or text.
15
-
* Use ES|QL high-level helpers: These helpers take care of parsing the raw response into something readily usable by the application. Several helpers are available for different use cases, such as object mapping, cursor traversal of results (in development), and dataframes (in development).
13
+
For lower-level control, you can also use the Elasticsearch [ES|QL API](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-esql) directly: This is the most flexible approach, but it's also the most complex because you must handle results in their raw form.
16
14
15
+
You can choose the precise format of results, such as JSON, CSV, or text.
17
16
18
17
## How to use the ES|QL API [esql-how-to]
19
18
@@ -23,28 +22,15 @@ The following example gets ES|QL results as CSV and parses them:
The previous example showed that although the raw ES|QL API offers maximum flexibility, additional work is required in order to make use of the result data.
36
35
37
-
To simplify things, try working with these three main representations of ES|QL results (each with its own mapping helper):
38
-
39
-
***Objects**, where each row in the results is mapped to an object from your application domain. This is similar to what ORMs (object relational mappers) commonly do.
40
-
***Cursors**, where you scan the results row by row and access the data using column names. This is similar to database access libraries.
41
-
***Dataframes**, where results are organized in a column-oriented structure that allows efficient processing of column data.
The recommended approach is [LINQ to ES|QL](linq-to-esql.md), which provides type-safe queries with automatic result mapping. See the [LINQ to ES|QL](linq-to-esql.md) documentation for details.
0 commit comments