ES|QL limitations
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
Generally available
By default, an ES|QL query returns up to 1,000 rows. You can increase the number of rows up to 10,000 using the LIMIT command.
For instance,
FROM index | WHERE field = "value"
is equivalent to:
FROM index | WHERE field = "value" | LIMIT 1000
Queries do not return more than 10,000 rows, regardless of the LIMIT command’s value. This is a configurable upper limit.
To overcome this limitation:
- Reduce the result set size by modifying the query to only return relevant data. Use
WHEREto select a smaller subset of the data. - Shift any post-query processing to the query itself. You can use the ES|QL
STATScommand to aggregate data in the query.
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.
Consider the following two queries:
FROM index | WHERE field0 == "value" | LIMIT 20000
and
FROM index | STATS AVG(field1) BY field2 | LIMIT 20000
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.
The default and maximum limits can be changed using these dynamic cluster settings:
esql.query.result_truncation_default_sizeesql.query.result_truncation_max_size
For time-series queries that use the TS or PROMQL source commands (including requests to the PromQL HTTP API), the default and maximum limits are higher and can be changed using these cluster settings:
esql.query.timeseries_result_truncation_default_sizeesql.query.timeseries_result_truncation_max_size
Modifying these values involves trade-offs. A larger result-set involves a higher memory pressure and increased processing times. Internode traffic within and across clusters can also increase.
These limitations are similar to those enforced by the search API for pagination.
| Functionality | Search | ES|QL |
|---|---|---|
| Results returned by default | 10 | 1,000 |
| Results returned by default (time-series aggregations) | 10 | 10,000 |
| Default upper limit | 10,000 | 10,000 |
| Default upper limit (time-series aggregations) | 10,000 | 10,000,000 |
| Specify number of results | size |
LIMIT |
| Change default number of results | n/a | esql.query.result_truncation_default_size |
| Change default number of results (time-series aggregations) | n/a | esql.query.timeseries_result_truncation_default_size |
| Change default upper limit | index-max-result-window | esql.query.result_truncation_max_size |
| Change default upper limit (time-series aggregations) | index-max-result-window | esql.query.timeseries_result_truncation_max_size |
ES|QL currently supports the following field types:
aliasbooleandatedate_nanos(Tech Preview)- The following functions don’t yet support date nanos:
bucket,date_format,date_parse,date_diff,date_extract - You can use
to_datetimeto cast to millisecond dates to use unsupported functions
- The following functions don’t yet support date nanos:
date_rangerange family The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Preview since 9.5 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Preview This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.double(float,half_float,scaled_floatare represented asdouble)double_rangerange family The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Preview This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.dense_vectorThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Preview since 9.2 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Preview This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.flattenedThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Preview since 9.5 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.ipkeywordfamily includingkeyword,constant_keyword, andwildcardint(shortandbyteare represented asint)longnulltextfamily includingtext,semantic_textandmatch_only_textunsigned_longThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Preview This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Preview This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.versionSpatial types
geo_pointgeo_shapepointshape
TSDB metrics The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Preview since 9.2 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Preview This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
countergaugeaggregate_metric_double: Aggregation functions that do not natively supportaggregate_metric_doublewill use the average value and treat it as adouble. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Preview since 9.4 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Preview This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.exponential_histogramThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.4 This functionality is generally available and ready for production usage. Preview in 9.3 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.tdigestThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.4 This functionality is generally available and ready for production usage. Preview in 9.3 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
ES|QL does not support certain field types. If the limitation only applies to specific product versions, it is indicated in the following list:
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available from 9.0 to 9.1 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
dense_vectorThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available from 9.0 to 9.1 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. TSDB metrics
countergaugeaggregate_metric_double
Other types
binarycompletionfloat_rangehistogram(can be queried via casting totdigestorexponential_histogram)integer_rangeip_rangelong_rangenestedrank_featurerank_featuresrank_vectorssearch_as_you_type
Querying a column with an unsupported type returns an error. If a column with an unsupported type is not explicitly used in a query, it is returned with null values, with the exception of nested fields. Nested fields are not returned at all. To understand how unsupported types are reported in the API response, refer to column metadata.
Some field types are not supported in all contexts:
Spatial types are not supported in the SORT processing command. Specifying an expression that evaluates to one of these types as a sort key will result in an error:
geo_pointgeo_shapecartesian_pointcartesian_shape
- In addition, when querying multiple indexes, it’s possible for the same field to be mapped to multiple types. These fields cannot be directly used in queries or returned in results, unless they’re explicitly converted to a single type.
The spatial types geo_point, geo_shape, cartesian_point and cartesian_shape are maintained at source precision in the original documents,
but indexed at reduced precision by Lucene, for performance reasons.
To ensure this optimization is available in the widest context, all spatial functions will produce results
at this reduced precision, aligned with the underlying Lucene index grid.
For geo_point and geo_shape, this grid is smaller than 1 cm at the equator, which is still very high precision for most use cases.
If the exact, original precision is desired, return the original field in the ES|QL query, which will maintain the original values.
To prioritize performance over precision, simply drop that field.
For example:
FROM airports
| EVAL geohex = ST_GEOHEX(location, 1)
| KEEP location, geohex
This query will perform slowly, due to the need to retrieve the original location field from the source document.
However, the following example will perform much faster:
FROM airports
| EVAL geohex = ST_GEOHEX(location, 1)
| EVAL x = ST_X(location), y = ST_Y(location)
| KEEP x, y, geohex
This query will perform much faster, since the original field location is not retrieved, and the three spatial functions used will all return values aligned with the Lucene index grid.
Note that if you return both the original location and the extracted x and y you will see very slight differences in the extracted values due to the precision loss.
-
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Preview since 9.2
This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
The following types are only partially supported on 9.2.0. This is fixed in 9.2.1:
dense_vector: TheKNNfunction and theTO_DENSE_VECTORfunction will work and any field data will be retrieved as part of the results. However, the type will appear asunsupportedwhen these functions are not used.aggregate_metric_double: Using theTO_AGGREGATE_METRIC_DOUBLEfunction will work and any field data will be retrieved as part of the results. However, the type will appear asunsupportedif this function is not used.NoteThis means that a simple query like
FROM testwill not retrievedense_vectororaggregate_metric_doubledata. However, using the appropriate functions will work:FROM test WHERE KNN("dense_vector_field", [0, 1, 2, ...])FROM test | EVAL agm_data = TO_AGGREGATE_METRIC_DOUBLE(aggregate_metric_double_field)
ES|QL respects runtime fields defined in the index mapping and treats them like regular mapped fields. Use the EVAL command to compute fields at query time, the built-in equivalent of runtime fields.
Runtime fields are different from unmapped fields. An unmapped field is a field that does not exist in the mapping at all. By default, ES|QL returns an error when you reference an unmapped field, but you can change this behavior using the SET unmapped_fields directive. Loading unmapped fields from _source with SET unmapped_fields="load" is slower than querying mapped fields, and filters or sorts on loaded fields can force a full scan. To learn more, refer to Unmapped fields.
ES|QL does not support configurations where the _source field is disabled.
One limitation of full-text search is that it is necessary to use the search function,
like MATCH,
in a WHERE command directly after the
FROM source command, or close enough to it.
Otherwise, the query will fail with a validation error.
For example, this query is valid:
FROM books
| WHERE MATCH(author, "Faulkner") AND MATCH(author, "Tolkien")
But this query will fail due to the STATS command:
FROM books
| STATS AVG(price) BY author
| WHERE MATCH(author, "Faulkner")
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
INLINE STATS is an exception:
it can appear between FROM and the WHERE command without causing the query to fail.
Unlike STATS, it appends the aggregated values as new columns and keeps every input row,
so the search function can still use the index:
FROM books
| INLINE STATS max_year = MAX(year) BY publisher
| WHERE MATCH(author, "Faulkner") AND year == max_year
This applies to MATCH,
MATCH_PHRASE,
and the : operator. Other search functions, such as
KQL and
QSTR, are
still not supported after INLINE STATS. A STATS command before the search function still
causes the query to fail, even if an INLINE STATS comes after it.
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
This restriction only applies to searches on indexed fields. A search on an expression, such as a
column computed by EVAL, is a runtime search,
which can appear anywhere in the query.
Runtime search lets these functions search expressions and
other values that have no index behind them, such as a column computed by EVAL:
-
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Preview in 9.5
This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
MATCHand the:operator -
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
MATCH_PHRASE -
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Preview
This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
KNNondense_vectorexpressions
Runtime search has these limitations:
- It is usually slower than a search on an indexed field, because it analyzes every row that reaches it. Refer to Performance.
- The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Generally available This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. Relevance scores are not BM25, because there are no index statistics for an expression. Refer to Scoring.
-
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
The same query can see a different
_scoredepending on whether a search runs at runtime, because a runtime search only adds its score once it runs. For details, refer to When a runtime search score is visible and this_scoreissue. -
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
A runtime search after a
FORKor aFROMwith subqueries filters rows, but doesn't contribute to_scoreunless it can be pushed into the branches (#161746). -
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
The
analyzeroptions ofTO_TEXT,MATCHandMATCH_PHRASEonly accept built-in analyzers and analyzers provided by plugins, not custom analyzers defined in an index's settings. Refer to Analyzers. -
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
On expressions that are not
text,MATCHonly supports thelenientoption, andMATCH_PHRASEsupports no options. Refer to Options. -
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
The
search.allow_expensive_queriessetting doesn't apply, so options such asfuzzinessrun even when it isfalse(#162256). -
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
A mapped
textfield in the output of aFORKwhose branches contain a command such asLIMITorSTATS, can't be searched directly. Declare an analyzer for it withTO_TEXT, or search it inside the branches. Refer to Indexedtextfields searched at runtime. QSTRandKQLdon't support runtime search.-
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Preview
This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
KNNon adense_vectorexpression needs a laterLIMITto set the number of nearest neighbors to find. In 9.6.0, aLIMITafterSTATSdoesn't count, so add aLIMITbeforeSTATS. Refer to known issues.
An indexed text field searched at runtime, for example after
MV_EXPAND, is silently analyzed with the standard
analyzer instead of the analyzer in its mapping. Refer to
Indexed text fields searched at runtime.
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
KNN on a dense_vector expression requires every participating node to run version 9.6 or later.
During a rolling upgrade, or when a remote cluster in a cross-cluster search (CCS) runs an earlier version,
the coordinating node rejects the query before it runs with this error:
KNN over a non-index-mapped field or expression is not supported on every participating node; rolling upgrade in progress, or a remote cluster is on an older version
Upgrade all nodes and remote clusters before you run queries that use KNN on an expression.
Lastly, note that any queries on text fields that do not explicitly use the full-text functions,
MATCH,
MATCH_PHRASE,
QSTR or
KQL,
will behave as if the fields are actually keyword fields: they are case-sensitive and need to match the full string.
As discussed in more detail in Using ES|QL to query multiple indices, ES|QL can execute a single query across multiple indices, data streams, or aliases. However, there are some limitations to be aware of:
- All underlying indexes and shards must be active. Using admin commands or UI, it is possible to pause an index or shard, for example by disabling a frozen tier instance, but then any ES|QL query that includes that index or shard will fail, even if the query uses
WHEREto filter out the results from the paused index. If you see an error of typesearch_phase_execution_exception, with the messageSearch rejected due to missing shards, you likely have an index or shard inUNASSIGNEDstate. - The same field must have the same type across all indexes. If the same field is mapped to different types it is still possible to query the indexes, but the field must be explicitly converted to a single type.
Time series data streams (TSDS) are supported in technical preview.
ES|QL does not support querying time series data streams (TSDS).
Date math expressions work well when the leftmost expression is a datetime, for example:
now() + 1 year - 2hour + ...
But using parentheses or putting the datetime to the right is not always supported yet. For example, the following expressions fail:
1year + 2hour + now()
now() + (1year + 2hour)
Date math does not allow subtracting two datetimes, for example:
now() - 2023-10-26
While all three enrich policy types are supported, there are some limitations to be aware of:
- The
geo_matchenrich policy type only supports theintersectsspatial relation. - It is required that the
match_fieldin theENRICHcommand is of the correct type. For example, if the enrich policy is of typegeo_match, thematch_fieldin theENRICHcommand must be of typegeo_pointorgeo_shape. Likewise, arangeenrich policy requires amatch_fieldof typeinteger,long,date, orip, depending on the type of the range field in the original enrich index. - However, this constraint is relaxed for
rangepolicies when thematch_fieldis of typeKEYWORD. In this case the field values will be parsed during query execution, row by row. If any value fails to parse, the output values for that row will be set tonull, an appropriate warning will be produced and the query will continue to execute.
The DISSECT command does not support reference keys.
The GROK command does not support configuring custom patterns, or multiple patterns. The GROK command is not subject to Grok watchdog settings.
ES|QL supports multivalued fields,
but functions return null when applied to a multivalued field, unless documented otherwise.
Work around this limitation by converting the field to single value with one of the
multivalue functions.
CATEGORIZE grouping function is not currently supported.
Also, INLINE STATS cannot yet have an unbounded SORT before it. You must either move the SORT after it, or add a LIMIT before the SORT.
Subqueries and
views are closely related,
since both extend the
FROM command with
branched query plans. Their nesting and branching support varies by version,
and each has additional limitations described in turn below.
A FROM subquery can contain further FROM subqueries. Nested branches are
subject to the query-wide branch and command limits described in
How views execute.
For example, each outer subquery in this query contains further FROM
subqueries:
FROM
(FROM
(FROM employees | WHERE emp_no > 10090),
(FROM sample_data | WHERE client_ip == "172.21.3.15")
),
(FROM
(FROM employees | WHERE emp_no < 10010),
(FROM sample_data | WHERE client_ip == "172.21.0.5")
)
| KEEP emp_no, languages, client_ip
A FROM subquery cannot contain another FROM subquery. Only one level of
FROM nesting is allowed. A FROM subquery can still contain
IN subqueries in its
WHERE commands, EVAL commands, and STATS or INLINE STATS per-aggregate
WHERE filters.
Use only a single level of subqueries:
FROM
(FROM employees | WHERE emp_no > 10090),
(FROM sample_data | WHERE client_ip == "172.21.3.15"),
(FROM employees | WHERE emp_no < 10010),
(FROM sample_data | WHERE client_ip == "172.21.0.5")
| KEEP emp_no, languages, client_ip
FORK can be used inside a
FROM subquery or after a FROM that contains subqueries. Two user-written
FORK commands still can't occur along the same uninterrupted pipeline.
For example, FORK can be used inside a subquery:
FROM
(FROM employees
| FORK
(WHERE emp_no > 10090)
(WHERE emp_no < 10010))
| KEEP emp_no, languages
It can also be used after a FROM with subqueries:
FROM
employees,
(FROM sample_data | WHERE client_ip == "172.21.3.15")
| FORK
(WHERE emp_no > 10090)
(WHERE client_ip IS NOT NULL)
FORK can't be used inside a FROM subquery or after a FROM that contains
subqueries.
Views reuse the same branching model as subqueries. The following limitations include the version-specific rules for nested branching and query compaction.
A role entry that grants read on a view name must not carry DLS or FLS restrictions. If it does, the query fails with a 403. DLS/FLS on the underlying indices is applied normally. Refer to view privileges.
Views may be nested up to depth 10.
View definitions can contain branched query plans created by FROM subqueries,
nested views, and FORK.
These branches can be nested, subject to the branch and command limits described
in How views execute.
Branching and nesting are allowed in combination only when there is no more than one branch point. A view can contain subqueries only when the resulting plan can be flattened through query compaction.
Views can reference remote indices in cross-cluster search, but you can't query a view that is defined on a remote cluster.
Remote views are invisible to source resolution. An exact reference such as FROM cluster:view returns an Unknown index error.
A query fails if its source expression matches a remote view.
Views are available in serverless and cross-project search, but with some limitations:
- You can define views in both origin and linked projects.
- CPS resolves index expressions against indices in every project that the
expression targets, but it resolves views only in the origin project. Views
in linked projects are invisible to the query, including through qualified
expressions such as
FROM linked-project:view. - CPS uses the same resolution process for index expressions in the top-level query and inside view definitions.
- An unqualified index expression can match a view in the origin project and indices in linked projects. CPS returns results from both.
A Query DSL filter on the request applies to the output of a view, after the commands in the view definition. If Elasticsearch can't translate a filter clause to ES|QL, it omits that clause for the view and returns a warning. Check the response warnings because omitting a clause can produce more results than the complete filter would.
For example, create a view that counts sales by region:
PUT /_query/view/sales_by_region{ "query": "FROM sales | STATS total = COUNT(*) BY region" }
The following request requires both should clauses to match:
POST /_query{ "query": "FROM sales_by_region | KEEP region, total | LIMIT 1000", "filter": { "bool": { "should": [ { "term": { "region": "eu" } }, { "term": { "total": 3 } } ], "minimum_should_match": 2 } } }
ES|QL can't translate a minimum_should_match value greater than 1. It skips
the should group for the view, which can return more rows than the complete
filter would, and returns this warning:
The request filter could not be fully applied to view(s); the following Query DSL constructs are not supported and were skipped: [bool[minimum_should_match=2]] on view [sales_by_region]. Use a WHERE clause to filter rows from views instead
A Query DSL filter on the request applies to the source indices in the view definition, not to the view output.
A view definition can read from index aliases and data streams. An alias cannot point to a view.
An Elasticsearch transform is not an ES|QL source. To query transform results from a view, use the transform's destination index as the source in the view definition.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is not available in Elastic Cloud Serverless. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is experimental and is not ready for production usage. Experimental features may change or be removed at any time. Elastic will work to fix any issues, but experimental features are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Unavailable
Unavailable
Stack
Experimental
9.5
…
Experimental in 9.5
A view definition can read from a dataset, which ES|QL Data Federation uses to query external data.
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
A wildcard in the view definition
matches datasets only when the view definition sets wildcards_match_datasets
to true.
Only the following settings are supported in a view definition:
| Setting | Supported values |
|---|---|
unmapped_fields |
DEFAULT, NULLIFY, and LOAD |
wildcards_match_views |
true and false |
wildcards_match_datasets
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Unavailable
This functionality is not available in Elastic Cloud Serverless.
|
true and false |
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Preview
This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
LOAD_ALL
is not supported in a view definition.
All other settings, including time_zone, are rejected in a view definition.
A view definition can't contain a SET directive.
The three settings supported in view definitions are scoped at every view boundary. Values from the calling query, request body, or an enclosing view don't enter the view. The cluster setting is used to set the default throughout the query, both inside and outside views. A value in a view definition overrides that default for its body, but doesn't enter a nested view. If neither is configured, the built-in default applies.
Other query settings are rejected in a view definition, but aren't scoped to
individual views. Their effective value for the calling query can apply while
evaluating a view. For example, time_zone can apply inside a view.
At a view boundary:
unmapped_fields: Fields loaded by an outer query arenullfor rows from a view unless the view produces those fields itself. If an outer setting would have loaded fields that the view doesn't produce, the response warning identifies the view and the fields that arenull.- For each supported wildcard setting, exact names work regardless of the
setting. A wildcard matches the corresponding target type only when the view
definition sets the setting to
true. If atruevalue from outside the view stops at the boundary and the wildcard would otherwise have matched targets, the response returns a warning that identifies the view and the missed matches.
The effective query settings apply throughout the query, including inside view bodies.
Query parameters are not allowed in a stored view definition. A calling query
can still use parameters in commands after FROM view_name, but those parameters
are not substituted into the view body.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
Planned
Planned
A view that starts with TS
must also contain a STATS command after it. A view without STATS is
rejected when you create or update it. This ensures the view returns plain
tabular results. A PROMQL view must also use an aggregation function.
Query a time series view with FROM view_name. A view name cannot be used as a
source in TS or PROMQL. An exact view name in one of those source commands is
rejected, and a wildcard source expression skips matching views.
When you create or update a view, Elasticsearch validates its name, size, query syntax, and the settings that are allowed in a view definition.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.
Availability
Generally available
This functionality is generally available and ready for production usage.
Serverless interfaces and procedures might differ from classic Elastic Stack deployments.
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
For a time series
view, Elasticsearch also validates that TS is followed by STATS.
Elasticsearch doesn't resolve or execute the query, and it doesn't check whether referenced indices, fields, datasets, or views exist, or whether nested views form a cycle. Creation doesn't return warnings for those problems. Elasticsearch reports them when you query the view.
Deleting a resource doesn't check whether a view depends on it. Deleting an index, data stream, alias, dataset, or nested view can therefore cause existing views to fail when queried.
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is not available in Elastic Cloud Serverless. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is experimental and is not ready for production usage. Experimental features may change or be removed at any time. Elastic will work to fix any issues, but experimental features are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Unavailable
Unavailable
Stack
Experimental
9.5
…
Experimental in 9.5
Datasets created through ES|QL Data Federation don't support every operation that works on an Elasticsearch index. For example, a dataset can't be the lookup target of LOOKUP JOIN or the source of TS. For the full list, refer to Query external datasets with ES|QL Data Federation > Limitations.
- The filter bar interface is not enabled when Discover is in ES|QL mode. To filter data, use variable controls, filter buttons within the table and field list, or write a query that uses the
WHEREcommand instead. - Discover shows no more than 10,000 rows. This limit only applies to the number of rows that are retrieved by the query and displayed in Discover. Queries and aggregations run on the full data set.
- When a query uses
KEEP,STATS, orPROMQLand returns more than 50 columns, Discover shows the first 50 columns by default. To choose which columns appear, refer to Show specific columns in the results table. - CSV export from Discover stops at a row limit that depends on your version and deployment, or at a file size limit, whichever comes first. Queries and aggregations still run on the full data set. To find the limits, refer to Export Discover session results as CSV.
- Querying many indices at once without any filters can cause an error in kibana which looks like
[esql] > Unexpected error from Elasticsearch: The content length (536885793) is bigger than the maximum allowed string (536870888). The response from ES|QL is too long. UseDROPorKEEPto limit the number of fields returned.
Refer to Known issues for a list of known issues for ES|QL.