From da1a49a5c947af3f8df570bb1f5befdaffaef992 Mon Sep 17 00:00:00 2001 From: Bogdan Pintea Date: Tue, 26 Sep 2023 10:12:23 +0200 Subject: [PATCH] ESQL: Document the existing result-set limitations (#99880) Document the newly implicit limit of 500 (if no other limit is provided), as well as the global 10K one. Related: #99816 --- docs/reference/esql/index.asciidoc | 36 +++++++++++-------- .../esql/processing-commands/limit.asciidoc | 3 ++ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/docs/reference/esql/index.asciidoc b/docs/reference/esql/index.asciidoc index 7e22eae3ff1b5..ef9399c5e57da 100644 --- a/docs/reference/esql/index.asciidoc +++ b/docs/reference/esql/index.asciidoc @@ -92,6 +92,11 @@ POST /_query?format=txt ---- // TEST[setup:library] +The above query's `LIMIT` command limits results to 5 rows. + +If not specified, `LIMIT` defaults to `500`. A single query will not return +more than 10,000 rows, regardless of the `LIMIT` value. + [discrete] ==== {kib} @@ -105,20 +110,23 @@ with the time filter. [[esql-limitations]] === Limitations -{esql} currently supports the following <>: - -- `alias` -- `boolean` -- `date` -- `double` (`float`, `half_float`, `scaled_float` are represented as `double`) -- `ip` -- `keyword` family including `keyword`, `constant_keyword`, and `wildcard` -- `int` (`short` and `byte` are represented as `int`) -- `long` -- `null` -- `text` -- `unsigned_long` -- `version` +* {esql} currently supports the following <>: + +** `alias` +** `boolean` +** `date` +** `double` (`float`, `half_float`, `scaled_float` are represented as `double`) +** `ip` +** `keyword` family including `keyword`, `constant_keyword`, and `wildcard` +** `int` (`short` and `byte` are represented as `int`) +** `long` +** `null` +** `text` +** `unsigned_long` +** `version` + +* A single query will not return more than 10,000 rows, regardless of the +`LIMIT` command's value. -- include::esql-get-started.asciidoc[] diff --git a/docs/reference/esql/processing-commands/limit.asciidoc b/docs/reference/esql/processing-commands/limit.asciidoc index 963ea2eea37ce..59272fe25614d 100644 --- a/docs/reference/esql/processing-commands/limit.asciidoc +++ b/docs/reference/esql/processing-commands/limit.asciidoc @@ -7,3 +7,6 @@ The `LIMIT` processing command enables you to limit the number of rows: ---- include::{esql-specs}/docs.csv-spec[tag=limit] ---- + +If not specified, `LIMIT` defaults to `500`. A single query will not return +more than 10,000 rows, regardless of the `LIMIT` value.