ES|QL
- class elasticsearch.client.EsqlClient(client)
- Parameters:
client (BaseClient)
- query(*, query=None, version=None, columnar=None, delimiter=None, error_trace=None, filter=None, filter_path=None, format=None, human=None, locale=None, params=None, pretty=None, body=None)
Executes an ESQL request
https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-rest.html
- Parameters:
query (str | None) – The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.
version (Literal['2024.04.01'] | str | None) – The version of the ES|QL language in which the “query” field was written.
columnar (bool | None) – By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.
delimiter (str | None) – The character to use between values within a CSV row. Only valid for the CSV format.
filter (Mapping[str, Any] | None) – Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.
format (str | None) – A short version of the Accept header, e.g. json, yaml.
locale (str | None)
params (Sequence[None | bool | float | int | str] | None) – To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
ObjectApiResponse[Any]