Translate SQL into Elasticsearch queries
- POST also GET /_sql/translate
Translate an SQL search into a search API request containing Query DSL.
It accepts the same request body parameters as the SQL search API, excluding cursor.
- Index privileges:
read
Request
-
fetch_sizenumber · default: 1000 -
The maximum number of rows (or entries) to return in one response.
-
filterQueryContainer · default: none -
The Elasticsearch query DSL for additional filtering.
-
querystringrequired -
The SQL query to run.
Response
application/json
-
aggregationsmap string to AggregationContainer -
sizenumber -
_sourceSourceConfig -
fieldsFieldAndFormat -
fieldstring Fieldrequired -
A wildcard pattern. The request returns values for field names matching this pattern.
-
formatstring -
The format in which the values are returned.
-
include_unmappedboolean -
sortSort -
track_total_hitsboolean | number