You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/query-languages/esql/limitations.md
+36-2Lines changed: 36 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,20 +10,54 @@ mapped_pages:
10
10
11
11
## Result set size limit [esql-max-rows]
12
12
13
-
By default, an {{esql}} query returns up to 1000 rows. You can increase the number of rows up to 10,000 using the [`LIMIT`](/reference/query-languages/esql/esql-commands.md#esql-limit) command. Queries do not return more than 10,000 rows, regardless of the `LIMIT` command’s value.
13
+
By default, an {{esql}} query returns up to 1,000 rows. You can increase the number of rows up to 10,000 using the [`LIMIT`](/reference/query-languages/esql/esql-commands.md#esql-limit) command.
14
14
15
-
This limit only applies to the number of rows that are retrieved by the query. Queries and aggregations run on the full data set.
15
+
For instance,
16
+
```esql
17
+
FROM index | WHERE field = "value"
18
+
```
19
+
is equivalent to:
20
+
```esql
21
+
FROM index | WHERE field = "value" | LIMIT 1000
22
+
```
23
+
24
+
Queries do not return more than 10,000 rows, regardless of the `LIMIT` command’s value. This is a configurable upper limit.
16
25
17
26
To overcome this limitation:
18
27
19
28
* Reduce the result set size by modifying the query to only return relevant data. Use [`WHERE`](/reference/query-languages/esql/esql-commands.md#esql-where) to select a smaller subset of the data.
20
29
* Shift any post-query processing to the query itself. You can use the {{esql}} [`STATS`](/reference/query-languages/esql/esql-commands.md#esql-stats-by) command to aggregate data in the query.
21
30
31
+
The upper limit only applies to the number of rows that are output by the query, not to the number of documents it processes: the query runs on the full data set.
32
+
33
+
Consider the following two queries:
34
+
```esql
35
+
FROM index | WHERE field0 == "value" | LIMIT 20000
36
+
```
37
+
and
38
+
```esql
39
+
FROM index | STATS AVG(field1) BY field2 | LIMIT 20000
40
+
```
41
+
42
+
In both cases, the filtering by `field0` in the first query or the grouping by `field2` in the second is applied over all the documents present in the `index`, irrespective of their number or indexes size. However, both queries will return at most 10,000 rows, even if there were more rows available to return.
43
+
22
44
The default and maximum limits can be changed using these dynamic cluster settings:
23
45
24
46
*`esql.query.result_truncation_default_size`
25
47
*`esql.query.result_truncation_max_size`
26
48
49
+
However, doing so involves trade-offs. A larger result-set involves a higher memory pressure and increased processing times; the internode traffic within and across clusters can also increase.
50
+
51
+
These limitations are similar to those enforced by the [search API for pagination](/reference/elasticsearch/rest-apis/paginate-search-results.md#paginate-search-results).
Copy file name to clipboardExpand all lines: docs/reference/query-languages/query-dsl/query-dsl-script-score-query.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Final relevance scores from the `script_score` query cannot be negative. To supp
47
47
48
48
49
49
`min_score`
50
-
: (Optional, float) Documents with a score lower than this floating point number are excluded from the search results.
50
+
: (Optional, float) Documents with a score lower than this floating point number are excluded from search results and results collected by aggregations.
51
51
52
52
`boost`
53
53
: (Optional, float) Documents' scores produced by `script` are multiplied by `boost` to produce final documents' scores. Defaults to `1.0`.
0 commit comments