esql-limitations.asciidoc 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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. [discrete]
  74. [[esql-_source-availability]]
  75. === _source availability
  76. {esql} does not support configurations where the
  77. <<mapping-source-field,_source field>> is <<disable-source-field,disabled>>.
  78. experimental:[] {esql}'s support for <<synthetic-source,synthetic `_source`>>
  79. is currently experimental.
  80. [discrete]
  81. [[esql-limitations-full-text-search]]
  82. === Full-text search is not supported
  83. Because of <<esql-limitations-text-fields,the way {esql} treats `text` values>>,
  84. full-text search is not yet supported. Queries on `text` fields are like queries
  85. on `keyword` fields: they are case-sensitive and need to match the full string.
  86. For example, after indexing a field of type `text` with the value `Elasticsearch
  87. query language`, the following `WHERE` clause does not match because the `LIKE`
  88. operator is case-sensitive:
  89. [source,esql]
  90. ----
  91. | WHERE field LIKE "elasticsearch query language"
  92. ----
  93. The following `WHERE` clause does not match either, because the `LIKE` operator
  94. tries to match the whole string:
  95. [source,esql]
  96. ----
  97. | WHERE field LIKE "Elasticsearch"
  98. ----
  99. As a workaround, use wildcards and regular expressions. For example:
  100. [source,esql]
  101. ----
  102. | WHERE field RLIKE "[Ee]lasticsearch.*"
  103. ----
  104. [discrete]
  105. [[esql-limitations-text-fields]]
  106. === `text` fields behave like `keyword` fields
  107. While {esql} supports <<text,`text`>> fields, {esql} does not treat these fields
  108. like the Search API does. {esql} queries do not query or aggregate the
  109. <<analysis,analyzed string>>. Instead, an {esql} query will try to get a `text`
  110. field's subfield of the <<keyword,keyword family type>> and query/aggregate
  111. that. If it's not possible to retrieve a `keyword` subfield, {esql} will get the
  112. string from a document's `_source`. If the `_source` cannot be retrieved, for
  113. example when using synthetic source, `null` is returned.
  114. Note that {esql}'s retrieval of `keyword` subfields may have unexpected
  115. consequences. An {esql} query on a `text` field is case-sensitive. Furthermore,
  116. a subfield may have been mapped with a <<normalizer,normalizer>>, which can
  117. transform the original string. Or it may have been mapped with <<ignore-above>>,
  118. which can truncate the string. None of these mapping operations are applied to
  119. an {esql} query, which may lead to false positives or negatives.
  120. To avoid these issues, a best practice is to be explicit about the field that
  121. you query, and query `keyword` sub-fields instead of `text` fields.
  122. [discrete]
  123. [[esql-tsdb]]
  124. === Time series data streams are not supported
  125. {esql} does not support querying time series data streams (TSDS).
  126. [discrete]
  127. [[esql-limitations-date-math]]
  128. === Date math limitations
  129. Date math expressions work well when the leftmost expression is a datetime, for
  130. example:
  131. [source,txt]
  132. ----
  133. now() + 1 year - 2hour + ...
  134. ----
  135. But using parentheses or putting the datetime to the right is not always supported yet. For example, the following expressions fail:
  136. [source,txt]
  137. ----
  138. 1year + 2hour + now()
  139. now() + (1year + 2hour)
  140. ----
  141. Date math does not allow subtracting two datetimes, for example:
  142. [source,txt]
  143. ----
  144. now() - 2023-10-26
  145. ----
  146. [discrete]
  147. [[esql-limitations-enrich]]
  148. === Enrich limitations
  149. include::esql-enrich-data.asciidoc[tag=limitations]
  150. [discrete]
  151. [[esql-limitations-dissect]]
  152. === Dissect limitations
  153. include::esql-process-data-with-dissect-grok.asciidoc[tag=dissect-limitations]
  154. [discrete]
  155. [[esql-limitations-grok]]
  156. === Grok limitations
  157. include::esql-process-data-with-dissect-grok.asciidoc[tag=grok-limitations]
  158. [discrete]
  159. [[esql-limitations-mv]]
  160. === Multivalue limitations
  161. {esql} <<esql-multivalued-fields,supports multivalued fields>>, but functions
  162. return `null` when applied to a multivalued field, unless documented otherwise.
  163. Work around this limitation by converting the field to single value with one of
  164. the <<esql-mv-functions,multivalue functions>>.
  165. [discrete]
  166. [[esql-limitations-timezone]]
  167. === Timezone support
  168. {esql} only supports the UTC timezone.
  169. [discrete]
  170. [[esql-limitations-kibana]]
  171. === Kibana limitations
  172. include::esql-kibana.asciidoc[tag=limitations]