esql-limitations.asciidoc 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. [[esql-limitations]]
  2. == {esql} limitations
  3. ++++
  4. <titleabbrev>Limitations</titleabbrev>
  5. ++++
  6. [discrete]
  7. [[esql-max-rows]]
  8. === Result set size limit
  9. By default, an {esql} query returns up to 1000 rows. You can increase the number
  10. of rows up to 10,000 using the <<esql-limit>> command.
  11. include::processing-commands/limit.asciidoc[tag=limitation]
  12. [discrete]
  13. [[esql-supported-types]]
  14. === Field types
  15. [discrete]
  16. ==== Supported types
  17. {esql} currently supports the following <<mapping-types,field types>>:
  18. * `alias`
  19. * `boolean`
  20. * `date`
  21. * `date_nanos` (Tech Preview)
  22. ** The following functions don't yet support date nanos: `bucket`, `date_format`, `date_parse`, `date_diff`, `date_extract`
  23. ** You can use `to_datetime` to cast to millisecond dates to use unsupported functions
  24. * `double` (`float`, `half_float`, `scaled_float` are represented as `double`)
  25. * `ip`
  26. * `keyword` family including `keyword`, `constant_keyword`, and `wildcard`
  27. * `int` (`short` and `byte` are represented as `int`)
  28. * `long`
  29. * `null`
  30. * `text`
  31. * experimental:[] `unsigned_long`
  32. * `version`
  33. * Spatial types
  34. ** `geo_point`
  35. ** `geo_shape`
  36. ** `point`
  37. ** `shape`
  38. [discrete]
  39. ==== Unsupported types
  40. {esql} does not yet support the following field types:
  41. * TSDB metrics
  42. ** `counter`
  43. ** `position`
  44. ** `aggregate_metric_double`
  45. * Date/time
  46. ** `date_range`
  47. * Other types
  48. ** `binary`
  49. ** `completion`
  50. ** `dense_vector`
  51. ** `double_range`
  52. ** `flattened`
  53. ** `float_range`
  54. ** `histogram`
  55. ** `integer_range`
  56. ** `ip_range`
  57. ** `long_range`
  58. ** `nested`
  59. ** `rank_feature`
  60. ** `rank_features`
  61. ** `search_as_you_type`
  62. Querying a column with an unsupported type returns an error. If a column with an
  63. unsupported type is not explicitly used in a query, it is returned with `null`
  64. values, with the exception of nested fields. Nested fields are not returned at
  65. all.
  66. [discrete]
  67. ==== Limitations on supported types
  68. Some <<mapping-types,field types>> are not supported in all contexts:
  69. * Spatial types are not supported in the <<esql-sort,SORT>> processing command.
  70. Specifying a column of one of these types as a sort parameter will result in an error:
  71. ** `geo_point`
  72. ** `geo_shape`
  73. ** `cartesian_point`
  74. ** `cartesian_shape`
  75. In addition, when <<esql-multi-index, querying multiple indexes>>,
  76. it's possible for the same field to be mapped to multiple types.
  77. These fields cannot be directly used in queries or returned in results,
  78. unless they're <<esql-multi-index-union-types, explicitly converted to a single type>>.
  79. [discrete]
  80. [[esql-_source-availability]]
  81. === _source availability
  82. {esql} does not support configurations where the
  83. <<mapping-source-field,_source field>> is <<disable-source-field,disabled>>.
  84. experimental:[] {esql}'s support for <<synthetic-source,synthetic `_source`>>
  85. is currently experimental.
  86. [discrete]
  87. [[esql-limitations-full-text-search]]
  88. === Full-text search
  89. experimental:[] {esql}'s support for <<esql-search-functions,full-text search>>
  90. is currently in Technical Preview. One limitation of full-text search is that
  91. it is necessary to use the search function, like <<esql-match>>, in a <<esql-where>> command
  92. directly after the <<esql-from>> source command, or close enough to it.
  93. Otherwise, the query will fail with a validation error.
  94. Another limitation is that any <<esql-where>> command containing a full-text search function
  95. cannot also use disjunctions (`OR`).
  96. Because of <<esql-limitations-text-fields,the way {esql} treats `text` values>>,
  97. queries on `text` fields are like queries on `keyword` fields: they are
  98. case-sensitive and need to match the full string.
  99. For example, after indexing a field of type `text` with the value `Elasticsearch
  100. query language`, the following `WHERE` clause does not match because the `LIKE`
  101. operator is case-sensitive:
  102. [source,esql]
  103. ----
  104. | WHERE field LIKE "elasticsearch query language"
  105. ----
  106. The following `WHERE` clause does not match either, because the `LIKE` operator
  107. tries to match the whole string:
  108. [source,esql]
  109. ----
  110. | WHERE field LIKE "Elasticsearch"
  111. ----
  112. As a workaround, use wildcards and regular expressions. For example:
  113. [source,esql]
  114. ----
  115. | WHERE field RLIKE "[Ee]lasticsearch.*"
  116. ----
  117. [discrete]
  118. [[esql-limitations-text-fields]]
  119. === `text` fields behave like `keyword` fields
  120. While {esql} supports <<text,`text`>> fields, {esql} does not treat these fields
  121. like the Search API does. {esql} queries do not query or aggregate the
  122. <<analysis,analyzed string>>. Instead, an {esql} query will try to get a `text`
  123. field's subfield of the <<keyword,keyword family type>> and query/aggregate
  124. that. If it's not possible to retrieve a `keyword` subfield, {esql} will get the
  125. string from a document's `_source`. If the `_source` cannot be retrieved, for
  126. example when using synthetic source, `null` is returned.
  127. Note that {esql}'s retrieval of `keyword` subfields may have unexpected
  128. consequences. An {esql} query on a `text` field is case-sensitive. Furthermore,
  129. a subfield may have been mapped with a <<normalizer,normalizer>>, which can
  130. transform the original string. Or it may have been mapped with <<ignore-above>>,
  131. which can truncate the string. None of these mapping operations are applied to
  132. an {esql} query, which may lead to false positives or negatives.
  133. To avoid these issues, a best practice is to be explicit about the field that
  134. you query, and query `keyword` sub-fields instead of `text` fields.
  135. [discrete]
  136. [[esql-tsdb]]
  137. === Time series data streams are not supported
  138. {esql} does not support querying time series data streams (TSDS).
  139. [discrete]
  140. [[esql-limitations-date-math]]
  141. === Date math limitations
  142. Date math expressions work well when the leftmost expression is a datetime, for
  143. example:
  144. [source,txt]
  145. ----
  146. now() + 1 year - 2hour + ...
  147. ----
  148. But using parentheses or putting the datetime to the right is not always supported yet. For example, the following expressions fail:
  149. [source,txt]
  150. ----
  151. 1year + 2hour + now()
  152. now() + (1year + 2hour)
  153. ----
  154. Date math does not allow subtracting two datetimes, for example:
  155. [source,txt]
  156. ----
  157. now() - 2023-10-26
  158. ----
  159. [discrete]
  160. [[esql-limitations-enrich]]
  161. === Enrich limitations
  162. include::esql-enrich-data.asciidoc[tag=limitations]
  163. [discrete]
  164. [[esql-limitations-dissect]]
  165. === Dissect limitations
  166. include::esql-process-data-with-dissect-grok.asciidoc[tag=dissect-limitations]
  167. [discrete]
  168. [[esql-limitations-grok]]
  169. === Grok limitations
  170. include::esql-process-data-with-dissect-grok.asciidoc[tag=grok-limitations]
  171. [discrete]
  172. [[esql-limitations-mv]]
  173. === Multivalue limitations
  174. {esql} <<esql-multivalued-fields,supports multivalued fields>>, but functions
  175. return `null` when applied to a multivalued field, unless documented otherwise.
  176. Work around this limitation by converting the field to single value with one of
  177. the <<esql-mv-functions,multivalue functions>>.
  178. [discrete]
  179. [[esql-limitations-timezone]]
  180. === Timezone support
  181. {esql} only supports the UTC timezone.
  182. [discrete]
  183. [[esql-limitations-kibana]]
  184. === Kibana limitations
  185. include::esql-kibana.asciidoc[tag=limitations]