Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
* [`KNN`](../../functions-operators/dense-vector-functions.md#esql-knn)

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/reference/query-languages/esql/_snippets/lists/dense-vector-functions.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

The 'development' lifecycle is deprecated and will be removed in a future release.

% * {applies_to}`stack: development` {applies_to}`serverless: preview` [`V_COSINE`](../../functions-operators/dense-vector-functions.md#esql-v_cosine)
% * {applies_to}`stack: development` {applies_to}`serverless: preview` [`V_DOT_PRODUCT`](../../functions-operators/dense-vector-functions.md#esql-v_dot_product)
% * {applies_to}`stack: preview` {applies_to}`serverless: preview`[`V_HAMMING`](../../functions-operators/dense-vector-functions.md#esql-v_hamming)
% * {applies_to}`stack: development` {applies_to}`serverless: preview` [`V_L1_NORM`](../../functions-operators/dense-vector-functions.md#esql-v_l1_norm)
% * {applies_to}`stack: development` {applies_to}`serverless: preview` [`V_L2_NORM`](../../functions-operators/dense-vector-functions.md#esql-v_l2_norm)
% * {applies_to}`stack: development` {applies_to}`serverless: preview` [`V_MAGNITUDE`](../../functions-operators/dense-vector-functions.md#esql-v_magnitude)
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ mapped_pages:
:::
::::

::::{dropdown} Vector functions
:open:
:::{include} _snippets/lists/dense-vector-functions.md
:::
::::

::::{dropdown} Multi value functions
:open:
:::{include} _snippets/lists/mv-functions.md
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
applies_to:
stack: preview
serverless: preview
navigation_title: "Dense vector functions"
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-functions-operators.html#esql-dense-vector-functions
---

# {{esql}} dense vector functions [esql-dense-vector-functions]

{{esql}} supports dense vector functions for vector similarity calculations and
k-nearest neighbor search.
Dsense vector functions work with [
`dense_vector` fields](/reference/elasticsearch/mapping-reference/dense-vector.md)
and require appropriate field mappings.

{{esql}} supports these vector functions:

:::{include} ../_snippets/lists/dense-vector-functions.md
:::

:::{include} ../_snippets/functions/layout/knn.md
:::

% V_COSINE is currently a hidden feature
% To make it visible again, uncomment this and the line in
% lists/dense-vector-functions.md
% :::{include} ../_snippets/functions/layout/v_cosine.md
% :::

% V_DOT_PRODUCT is currently a hidden feature
% To make it visible again, uncomment this and the line in
% lists/dense-vector-functions.md
% :::{include} ../_snippets/functions/layout/v_dot_product.md
% :::

% V_HAMMING is currently a hidden feature
% To make it visible again, uncomment this and the line in
% lists/dense-vector-functions.md
% :::{include} ../_snippets/functions/layout/v_hamming.md
% :::

% V_L1_NORM is currently a hidden feature
% To make it visible again, uncomment this and the line in
% lists/dense-vector-functions.md
% :::{include} ../_snippets/functions/layout/v_l1_norm.md
% :::

% V_L2_NORM is currently a hidden feature
% To make it visible again, uncomment this and the line in
% lists/dense-vector-functions.md
% :::{include} ../_snippets/functions/layout/v_l2_norm.md
% :::

% V_MAGNITUDE is currently a hidden feature
% To make it visible again, uncomment this and the line in
% lists/dense-vector-functions.md
% :::{include} ../_snippets/functions/layout/v_magnitude.md
% :::
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Get started with {{esql}} for search use cases with
our [hands-on tutorial](/reference/query-languages/esql/esql-search-tutorial.md).

For a high-level overview of search functionalities in {{esql}}, and to learn about relevance scoring, refer to [{{esql}} for search](docs-content://solutions/search/esql-for-search.md#esql-for-search-scoring).
:::

{{esql}} provides a set of functions for performing searching on text fields.
For information regarding dense vector search functions,
including [KNN](dense-vector-functions.md#esql-knn), please refer to
the [Dense vector functions](dense-vector-functions.md) documentation.
:::

Use these functions
for [full-text search](docs-content://solutions/search/full-text.md)
and [semantic search](docs-content://solutions/search/semantic-search/semantic-search-semantic-text.md).

Full text functions can be used to
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/reference/query-languages/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ toc:
- file: esql/functions-operators/search-functions.md
- file: esql/functions-operators/spatial-functions.md
- file: esql/functions-operators/string-functions.md
- file: esql/functions-operators/dense-vector-functions.md
- file: esql/functions-operators/type-conversion-functions.md
- file: esql/functions-operators/mv-functions.md
- file: esql/functions-operators/operators.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public Knn(
+ "(docs-content://solutions/search/vector/knn.md#dense-vector-knn-search-rescoring) for details."
), },
description = "(Optional) kNN additional options as <<esql-function-named-params,function named parameters>>."
+ " See <<query-dsl-knn-query,knn query>> for more information.",
+ " See [knn query](/reference/query-languages/query-dsl/query-dsl-knn-query.md) for more information.",
optional = true
) Expression options
) {
Expand Down