Skip to content
Closed
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
6 changes: 3 additions & 3 deletions docs/reference/esql.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
# ES|QL in the Ruby client [esql]


This page helps you understand and use [ES|QL](docs-content://explore-analyze/query-filter/languages/esql.md) in the Ruby client.
This page helps you understand and use [ES|QL](elasticsearch://reference/query-languages/esql.md) in the Ruby client.

Check failure on line 10 in docs/reference/esql.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

'elasticsearch' was not found in the cross link index

There are two ways to use ES|QL in the Ruby client:

* 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.
* Use the Elasticsearch [ES|QL API](elasticsearch://reference/query-languages/esql/esql-rest.md) 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.

Check failure on line 14 in docs/reference/esql.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

'elasticsearch' was not found in the cross link index
* Use the Ruby ES|QL helper: The helper maps the raw response to an object that’s more readily usable by your application.

You can also try the [`elastic-esql`](#esql-ruby) gem, which helps you build ES|QL queries with Ruby.

## ES|QL API [esql-how-to]

The [ES|QL query API](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-esql) allows you to specify how results should be returned. You can choose a [response format](docs-content://explore-analyze/query-filter/languages/esql-rest.md#esql-rest-format) such as CSV, text, or JSON, then fine-tune it with parameters like column separators and locale.

Check failure on line 21 in docs/reference/esql.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Redirect target 'elasticsearch://reference/query-languages/esql/esql-rest.md' points to repository 'elasticsearch' for which no links.json was found.

By default, the `query` API returns a Hash response with `columns` and `values`:

Expand Down Expand Up @@ -111,7 +111,7 @@

## ES|QL Query Builder [esql-ruby]

The [`elastic-esql`](https://github.com/elastic/esql-ruby) gem helps you build queries for use with the [ES|QL query API](docs-content://explore-analyze/query-filter/languages/esql-rest.md). Here's an example:
The [`elastic-esql`](https://github.com/elastic/esql-ruby) gem helps you build queries for use with the [ES|QL query API](elasticsearch://reference/query-languages/esql/esql-rest.md). Here's an example:

Check failure on line 114 in docs/reference/esql.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

'elasticsearch' was not found in the cross link index

```ruby
query = Elastic::ESQL.from('sample')
Expand Down
Loading