esql-limitations.asciidoc 6.6 KB

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