diff --git a/docs/reference/query-languages/esql/_snippets/lists/type-conversion-functions.md b/docs/reference/query-languages/esql/_snippets/lists/type-conversion-functions.md index 3cfe7e8d0b96c..e2a76222a784a 100644 --- a/docs/reference/query-languages/esql/_snippets/lists/type-conversion-functions.md +++ b/docs/reference/query-languages/esql/_snippets/lists/type-conversion-functions.md @@ -1,3 +1,4 @@ +* [`TO_AGGREGATE_METRIC_DOUBLE`](../../functions-operators/type-conversion-functions.md#esql-to_aggregate_metric_double) {applies_to}`stack: preview 9.2` {applies_to}`serverless: preview` * [`TO_BOOLEAN`](../../functions-operators/type-conversion-functions.md#esql-to_boolean) * [`TO_CARTESIANPOINT`](../../functions-operators/type-conversion-functions.md#esql-to_cartesianpoint) * [`TO_CARTESIANSHAPE`](../../functions-operators/type-conversion-functions.md#esql-to_cartesianshape) @@ -5,6 +6,7 @@ * [`TO_DATETIME`](../../functions-operators/type-conversion-functions.md#esql-to_datetime) * [`TO_DATE_NANOS`](../../functions-operators/type-conversion-functions.md#esql-to_date_nanos) * [`TO_DEGREES`](../../functions-operators/type-conversion-functions.md#esql-to_degrees) +* [`TO_DENSE_VECTOR`](../../functions-operators/type-conversion-functions.md#esql-to_dense_vector) {applies_to}`stack: preview 9.2` {applies_to}`serverless: preview` * [`TO_DOUBLE`](../../functions-operators/type-conversion-functions.md#esql-to_double) * [`TO_GEOHASH`](../../functions-operators/type-conversion-functions.md#esql-to_geohash) {applies_to}`stack: preview` {applies_to}`serverless: preview` * [`TO_GEOHEX`](../../functions-operators/type-conversion-functions.md#esql-to_geohex) {applies_to}`stack: preview` {applies_to}`serverless: preview` diff --git a/docs/reference/query-languages/esql/functions-operators/type-conversion-functions.md b/docs/reference/query-languages/esql/functions-operators/type-conversion-functions.md index 4d635241d4e26..e0cfbd0c25181 100644 --- a/docs/reference/query-languages/esql/functions-operators/type-conversion-functions.md +++ b/docs/reference/query-languages/esql/functions-operators/type-conversion-functions.md @@ -22,6 +22,9 @@ mapped_pages: ::: +:::{include} ../_snippets/functions/layout/to_aggregate_metric_double.md +::: + :::{include} ../_snippets/functions/layout/to_boolean.md ::: @@ -43,6 +46,9 @@ mapped_pages: :::{include} ../_snippets/functions/layout/to_degrees.md ::: +:::{include} ../_snippets/functions/layout/to_dense_vector.md +::: + :::{include} ../_snippets/functions/layout/to_double.md ::: diff --git a/docs/reference/query-languages/esql/limitations.md b/docs/reference/query-languages/esql/limitations.md index 412a253638b86..7d469e63897ff 100644 --- a/docs/reference/query-languages/esql/limitations.md +++ b/docs/reference/query-languages/esql/limitations.md @@ -32,13 +32,14 @@ By default, an {{esql}} query returns up to 1,000 rows. You can increase the num * You can use `to_datetime` to cast to millisecond dates to use unsupported functions * `double` (`float`, `half_float`, `scaled_float` are represented as `double`) +* `dense_vector` {applies_to}`stack: preview 9.2` {applies_to}`serverless: preview` * `ip` * `keyword` [family](/reference/elasticsearch/mapping-reference/keyword.md) including `keyword`, `constant_keyword`, and `wildcard` * `int` (`short` and `byte` are represented as `int`) * `long` * `null` * `text` [family](/reference/elasticsearch/mapping-reference/text.md) including `text`, `semantic_text` and `match_only_text` -* {applies_to}`stack: preview` {applies_to}`serverless: preview` `unsigned_long` +* `unsigned_long` {applies_to}`stack: preview` {applies_to}`serverless: preview` * `version` * Spatial types @@ -46,26 +47,26 @@ By default, an {{esql}} query returns up to 1,000 rows. You can increase the num * `geo_shape` * `point` * `shape` -* TSDB metrics {preview}`9.2` - * `counter` - * `gauge` +* TSDB metrics {applies_to}`stack: preview 9.2` {applies_to}`serverless: preview` + * `counter` + * `gauge` * `aggregate_metric_double` - ### Unsupported types [_unsupported_types] {{esql}} does not yet support the following field types: ::::{tab-set} :::{tab-item} 9.0-9.1 +* `dense_vector` * TSDB metrics - * `counter` - * `gauge` + * `counter` + * `gauge` * `aggregate_metric_double` ::: :::{tab-item} 9.2+ -This limitation no longer exists and TSDB metrics are now supported (preview). +This limitation no longer exists and TSDB metrics and `dense_vector` are now supported (preview). ::: :::: * Date/time @@ -104,12 +105,19 @@ Some [field types](/reference/elasticsearch/mapping-reference/field-data-types.m * `cartesian_shape` -In addition, when [querying multiple indexes](/reference/query-languages/esql/esql-multi-index.md), 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](/reference/query-languages/esql/esql-multi-index.md#esql-multi-index-union-types). +- In addition, when [querying multiple indexes](/reference/query-languages/esql/esql-multi-index.md), 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](/reference/query-languages/esql/esql-multi-index.md#esql-multi-index-union-types). -* `dense_vector` field type is partially supported. [`KNN` function](elasticsearch://reference/query-languages/esql/functions-operators/dense-vector-functions.md#esql-knn) queries will work and any field data will be retrieved as part of the results. However, the type will appear as `unsupported` when the `KNN` function is not used. +#### Partial support in 9.2.0 -This means that `FROM test` will not retrieve `dense_vector` data. But, `FROM test WHERE KNN("dense_vector_field", [0, 1, 2, ...])` will retrieve data. +* {applies_to}`stack: preview 9.2.0` The following types are only partially supported on 9.2.0. This is fixed in 9.2.1: + * `dense_vector`: The [`KNN` function](/reference/query-languages/esql/functions-operators/dense-vector-functions.md#esql-knn) and the [`TO_DENSE_VECTOR` function](/reference/query-languages/esql/functions-operators/type-conversion-functions.md#esql-to_dense_vector) will work and any field data will be retrieved as part of the results. However, the type will appear as `unsupported` when these functions are not used. + * `aggregate_metric_double`: Using the [`TO_AGGREGATE_METRIC_DOUBLE` function](/reference/query-languages/esql/functions-operators/type-conversion-functions.md#esql-to_aggregate_metric_double) will work and any field data will be retrieved as part of the results. However, the type will appear as `unsupported` if this function is not used. + :::{note} + This means that a simple query like `FROM test` will not retrieve `dense_vector` or `aggregate_metric_double` data. 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)` + ::: ## _source availability [esql-_source-availability]