Skip to main content

Module esql

Module esql 

Source
Expand description

ES|QL responses and the sync/async /_query runners.

Structs§

EsqlColumn
EsqlResponse
Row-major values: one array of cells per row. columnar responses are transposed into this shape by decode_columnar so callers always see rows.

Functions§

decode
Strict decode of a row-major POST /_query response. Unknown fields are accepted; a missing or mistyped columns/values is an error, never an empty result.
decode_columnar
Strict decode of a column-major (columnar: true) response. values holds one array per column, each the length of the row count; the result is transposed into the row-major EsqlResponse shape.
poll_until_complete
Poll GET /_query/async/{id} until it reports completion, cleaning up on every exit path. max_polls * interval bounds the wait; run_async passes a bulk-export-sized budget, while tests pass a tiny one.
run_async
Run a query through the async API and poll until complete. ES|QL has no page-by-page cursor; the full result returns in one response. columnar: true keeps the payload and memory footprint low.
run_sync
Run a synchronous ES|QL query. query carries its own FROM and LIMIT.