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.
Required privileges
- Index privileges read
Request body
-
fetch_sizenumber · default: 1000 -
The maximum number of rows (or entries) to return in one response.
-
filter{} Query · default: none -
The Elasticsearch query DSL for additional filtering.
Response
application/json
-
aggregationsmap string to {} Aggregation -
_sourceunion oneOf - One of:
-
query{} Query