Translates SQL into Elasticsearch queries Added in 6.3.0
Body Required
-
fetch_size number
The maximum number of rows (or entries) to return in one response.
-
filter object
Additional properties are allowed.
-
SQL query to run.
-
time_zone string
Responses
-
200 application/json
Hide response attributes Show response attributes object
-
aggregations object
-
size number
-
fields array[object]
Hide fields attributes Show fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
query object
Additional properties are allowed.
sort string | object | array[string | object]
One of: Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
_score object
Additional properties are allowed.
Hide _score attribute Show _score attribute object
-
order string
Values are
asc
ordesc
.
-
-
_doc object
Additional properties are allowed.
Hide _doc attribute Show _doc attribute object
-
order string
Values are
asc
ordesc
.
-
-
_geo_distance object
Additional properties are allowed.
Hide _geo_distance attributes Show _geo_distance attributes object
-
mode string
Values are
min
,max
,sum
,avg
, ormedian
. -
distance_type string
Values are
arc
orplane
. -
ignore_unmapped boolean
-
order string
Values are
asc
ordesc
. -
unit string
Values are
in
,ft
,yd
,mi
,nmi
,km
,m
,cm
, ormm
. -
nested object
Additional properties are allowed.
Hide nested attributes Show nested attributes object
-
filter object
Additional properties are allowed.
-
max_children number
-
nested object
Additional properties are allowed.
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
-
_script object
Additional properties are allowed.
Hide _script attributes Show _script attributes object
-
order string
Values are
asc
ordesc
. -
Additional properties are allowed.
-
type string
Values are
string
,number
, orversion
. -
mode string
Values are
min
,max
,sum
,avg
, ormedian
. -
nested object
Additional properties are allowed.
Hide nested attributes Show nested attributes object
-
filter object
Additional properties are allowed.
-
max_children number
-
nested object
Additional properties are allowed.
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
One of: Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
_score object
Additional properties are allowed.
Hide _score attribute Show _score attribute object
-
order string
Values are
asc
ordesc
.
-
-
_doc object
Additional properties are allowed.
Hide _doc attribute Show _doc attribute object
-
order string
Values are
asc
ordesc
.
-
-
_geo_distance object
Additional properties are allowed.
Hide _geo_distance attributes Show _geo_distance attributes object
-
mode string
Values are
min
,max
,sum
,avg
, ormedian
. -
distance_type string
Values are
arc
orplane
. -
ignore_unmapped boolean
-
order string
Values are
asc
ordesc
. -
unit string
Values are
in
,ft
,yd
,mi
,nmi
,km
,m
,cm
, ormm
. -
nested object
Additional properties are allowed.
-
-
_script object
Additional properties are allowed.
Hide _script attributes Show _script attributes object
-
-
curl \
-X POST http://api.example.com/_sql/translate \
-H "Content-Type: application/json" \
-d '{"fetch_size":42.0,"filter":{},"query":"string","time_zone":"string"}'