|
5 | 5 | <titleabbrev>Limitations</titleabbrev>
|
6 | 6 | ++++
|
7 | 7 |
|
8 |
| -This is work in progress. |
| 8 | +[discrete] |
| 9 | +[[esql-max-rows]] |
| 10 | +=== Result set size limit |
| 11 | + |
| 12 | +By default, an {esql} query returns up to 500 rows. You can increase the number |
| 13 | +of rows up to 10,000 using the <<esql-limit>> command. Queries do not return |
| 14 | +more than 10,000 rows, regardless of the `LIMIT` command's value. |
| 15 | + |
| 16 | +This limit only applies to the number of rows that are retrieved by the query |
| 17 | +and displayed in Discover. Queries and aggregations run on the full data set. |
| 18 | + |
| 19 | +To overcome this limitation: |
| 20 | + |
| 21 | +* Reduce the result set size by modifying the query to only return relevant |
| 22 | +data. Use <<esql-where>> to select a smaller subset of the data. |
| 23 | +* Shift any post-query processing to the query itself. You can use the {esql} |
| 24 | +<<esql-stats-by>> command to aggregate data in the query. |
| 25 | +* Increase the limit with the `esql.query.result_truncation_max_size` static |
| 26 | +cluster setting. |
9 | 27 |
|
10 | 28 | [discrete]
|
11 | 29 | [[esql-supported-types]]
|
12 |
| -=== Supported types |
| 30 | +=== Field types |
| 31 | + |
| 32 | +[discrete] |
| 33 | +==== Supported types |
13 | 34 |
|
14 | 35 | {esql} currently supports the following <<mapping-types,field types>>:
|
15 | 36 |
|
16 |
| -** `alias` |
17 |
| -** `boolean` |
18 |
| -** `date` |
19 |
| -** `double` (`float`, `half_float`, `scaled_float` are represented as `double`) |
20 |
| -** `ip` |
21 |
| -** `keyword` family including `keyword`, `constant_keyword`, and `wildcard` |
22 |
| -** `int` (`short` and `byte` are represented as `int`) |
23 |
| -** `long` |
24 |
| -** `null` |
25 |
| -** `text` |
26 |
| -** `unsigned_long` |
27 |
| -** `version` |
| 37 | +* `alias` |
| 38 | +* `boolean` |
| 39 | +* `date` |
| 40 | +* `double` (`float`, `half_float`, `scaled_float` are represented as `double`) |
| 41 | +* `ip` |
| 42 | +* `keyword` family including `keyword`, `constant_keyword`, and `wildcard` |
| 43 | +* `int` (`short` and `byte` are represented as `int`) |
| 44 | +* `long` |
| 45 | +* `null` |
| 46 | +* `text` |
| 47 | +* `unsigned_long` |
| 48 | +* `version` |
| 49 | + |
| 50 | +[discrete] |
| 51 | +==== Unsupported types |
| 52 | + |
| 53 | +{esql} does not yet support the following field types: |
| 54 | + |
| 55 | +* TSDB metrics |
| 56 | +** `counter` |
| 57 | +** `position` |
| 58 | +** `aggregate_metric_double` |
| 59 | +* Geo/spatial |
| 60 | +** `geo_point` |
| 61 | +** `geo_shape` |
| 62 | +** `point` |
| 63 | +** `shape` |
| 64 | +* Date/time |
| 65 | +** `date_nanos` |
| 66 | +** `date_range` |
| 67 | +* Other types |
| 68 | +** `binary` |
| 69 | +** `completion` |
| 70 | +** `dense_vector` |
| 71 | +** `double_range` |
| 72 | +** `float_range` |
| 73 | +** `histogram` |
| 74 | +** `integer_range` |
| 75 | +** `ip_range` |
| 76 | +** `long_range` |
| 77 | +** `nested` |
| 78 | +** `rank_feature` |
| 79 | +** `rank_features` |
| 80 | +** `search_as_you_type` |
| 81 | + |
| 82 | +Querying a column with an unsupported type returns an error. If a column with an |
| 83 | +unsupported type is not explicitly used in a query, it is returned with `null` |
| 84 | +values, with the exception of nested fields. Nested fields are not returned at |
| 85 | +all. |
| 86 | + |
| 87 | +[discrete] |
| 88 | +[[esql-limitations-text-fields]] |
| 89 | +=== `text` fields behave like `keyword` fields |
| 90 | + |
| 91 | +While {esql} supports <<text,`text`>> fields, {esql} does not treat these fields |
| 92 | +like the Search API does. {esql} queries do not query or aggregate the |
| 93 | +<<analysis,analyzed string>>. Instead, an {esql} query will try to get a `text` |
| 94 | +field's subfield of the <<keyword,keyword family type>> and query/aggregate |
| 95 | +that. If it's not possible to retrieve a `keyword` subfield, {esql} will get the |
| 96 | +string from a document's `_source`. If the `_source` cannot be retrieved, for |
| 97 | +example when using synthetic source, `null` is returned. |
| 98 | + |
| 99 | +Note that {esql}'s retrieval of `keyword` subfields may have unexpected |
| 100 | +consequences. An {esql} query on a `text` field is case-sensitive. Furthermore, |
| 101 | +a subfield may have been mapped with a <<normalizer,normalizer>>, which can |
| 102 | +transform the original string. Or it may have been mapped with <<ignore-above>>, |
| 103 | +which can truncate the string. None of these mapping operations are applied to |
| 104 | +an {esql} query, which may lead to false positives or negatives. |
| 105 | + |
| 106 | +To avoid these issues, a best practice is to be explicit about the field that |
| 107 | +you query, and query `keyword` sub-fields instead of `text` fields. |
28 | 108 |
|
29 | 109 | [discrete]
|
30 | 110 | [[esql-tsdb]]
|
31 |
| -=== {esql} and time series data |
| 111 | +=== Time series data streams are not supported |
32 | 112 |
|
33 |
| -{esql} does not support time series data (TSDS). |
| 113 | +{esql} does not support querying time series data streams (TSDS). |
34 | 114 |
|
35 | 115 | [discrete]
|
36 |
| -[[esql-max-rows]] |
37 |
| -=== 10,000 row maximum |
| 116 | +[[esql-limitations-date-math]] |
| 117 | +=== Date math limitations |
| 118 | + |
| 119 | +Date math expressions work well when the leftmost expression is a datetime, for |
| 120 | +example: |
| 121 | +[source,txt] |
| 122 | +---- |
| 123 | +now() + 1 year - 2hour + ... |
| 124 | +---- |
| 125 | + |
| 126 | +But using parentheses or putting the datetime to the right is not always supported yet. For example, the following expressions fail: |
| 127 | +[source,txt] |
| 128 | +---- |
| 129 | +1year + 2hour + now() |
| 130 | +now() + (1year + 2hour) |
| 131 | +---- |
| 132 | + |
| 133 | +Date math does not allow subtracting two datetimes, for example: |
| 134 | +[source,txt] |
| 135 | +---- |
| 136 | +now() - 2023-10-26 |
| 137 | +---- |
| 138 | + |
| 139 | +[discrete] |
| 140 | +[[esql-limitations-enrich]] |
| 141 | +=== Enrich limitations |
| 142 | + |
| 143 | +include::esql-enrich-data.asciidoc[tag=limitations] |
| 144 | + |
| 145 | +[discrete] |
| 146 | +[[esql-limitations-kibana]] |
| 147 | +=== Kibana limitations |
38 | 148 |
|
39 |
| -A single query will not return more than 10,000 rows, regardless of the |
40 |
| -`LIMIT` command's value. |
| 149 | +include::esql-kibana.asciidoc[tag=limitations] |
0 commit comments