Skip to content

Docs: vector index limitations #17591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions ydb/docs/en/core/_includes/vector_index_limitations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% note alert %}

The functionality of vector indexes is available in the test mode in main. The stable version is planned for 25.1.

Currently not supported:

* modifying rows in tables with vector indexes
* using bit vectors

These limitations may be removed in future versions.

{% endnote %}
10 changes: 2 additions & 8 deletions ydb/docs/en/core/dev/vector-indexes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Vector Indexes

{% include [limitations](../_includes/vector_index_limitations.md) %}

[Vector indexes](../concepts/glossary.md#vector-index) are specialized data structures that enable efficient [vector search](../concepts/vector_search.md) in multidimensional spaces. Unlike [secondary indexes](../concepts/glossary.md#secondary-index), which optimize searching by equality or range, vector indexes allow similarity searching based on distance or similarity functions.

Data in a {{ ydb-short-name }} table is stored and sorted by the primary key, ensuring efficient searching by exact match and range scanning. Vector indexes provide similar efficiency for nearest neighbor searches in vector spaces.
Expand Down Expand Up @@ -120,11 +122,3 @@ It is recommended to check the optimality of the written query using [query stat

{% endnote %}

## Limitations of Vector Indexes {#limitations}

Currently not supported:

* modifying rows in tables with vector indexes
* using bit vectors

These limitations may be removed in future versions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

{% include [OLAP_not_allow_note](../../../../_includes/not_allow_for_olap_note.md) %}

{% include [limitations](../../../../_includes/vector_index_limitations.md) %}

{% endif %}

## Adding an index {#add-index}
Expand All @@ -14,8 +16,8 @@
ALTER TABLE `series` ADD INDEX `title_index` GLOBAL ON (`title`);
```

You can specify any secondary index parameters from the [`CREATE TABLE`](../create_table/secondary_index.md) command.
You can specify any vector index parameters from the [`CREATE TABLE`](../create_table/vector_index.md) command.
You can specify any [secondary index](../../../../concepts/glossary.md#secondary-index) parameters from the `CREATE TABLE` [command](../create_table/secondary_index.md).
You can specify any [vector index](../../../../concepts/glossary.md#vector-index) parameters from the `CREATE TABLE` [command](../create_table/vector_index.md).

{% if backend_name == "YDB" %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

{% include [not_allow_for_olap](../../../../_includes/not_allow_for_olap_note.md) %}

{% include [limitations](../../../../_includes/vector_index_limitations.md) %}

{% note warning %}

It makes no sense to create an empty table with a vector index, because for now we don't allow mutations in tables with vector indexes.

You should use `ALTER TABLE ... ADD INDEX` to add a vector index to an existing table.
You should use `ALTER TABLE ... ADD INDEX` [command](../alter_table/indexes.md)) to add a vector index to an existing table.

{% endnote %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

{% include [OLAP_not_allow_text](../../../../_includes/not_allow_for_olap_text.md) %}

{% include [limitations](../../../../_includes/vector_index_limitations.md) %}

{% endnote %}

{% endif %}
Expand Down
12 changes: 12 additions & 0 deletions ydb/docs/ru/core/_includes/vector_index_limitations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% note alert %}

Функционал векторных индексов доступен в тестовом режиме в main. В стабильной версии планируется в 25.1.

В настоящее время не поддерживается:

* изменение строк в таблицах с векторными индексами;
* использование битовых векторов.

Эти ограничения будут сняты в будущих версиях.

{% endnote %}
13 changes: 3 additions & 10 deletions ydb/docs/ru/core/dev/vector-indexes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Векторные индексы

{% include [limitations](../_includes/vector_index_limitations.md) %}

[Векторные индексы](../concepts/glossary.md#vector-index) — это специализированные структуры данных, которые позволяют эффективно выполнять [векторный поиск](../concepts/vector_search.md) в многомерных пространствах. В отличие от [вторичных индексов](../concepts/glossary.md#secondary-index), которые оптимизируют поиск по равенству или диапазону, векторные индексы позволяют выполнять поиск по сходству на основе функций расстояния или схожести.

Данные в таблице {{ ydb-short-name }} хранятся и сортируются по первичному ключу, что обеспечивает эффективный поиск по точному совпадению и сканирование диапазонов. Векторные индексы предоставляют аналогичную эффективность для поиска ближайших соседей в векторных пространствах.
Expand Down Expand Up @@ -119,13 +121,4 @@ LIMIT 10;

Рекомендуется проверять оптимальность написанного запроса, используя [статистику запросов](query-plans-optimization.md). В частности, следует следить за отсутствием полного сканирования (full scan) основной таблицы.

{% endnote %}

## Ограничения векторных индексов {#limitations}

В настоящее время не поддерживается:

* изменение строк в таблицах с векторными индексами;
* использование битовых векторов.

Эти ограничения могут быть сняты в будущих версиях.
{% endnote %}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

{% include [OLAP_not_allow_note](../../../../_includes/not_allow_for_olap_note.md) %}

{% include [limitations](../../../../_includes/vector_index_limitations.md) %}

{% endif %}

## Добавление индекса {#add-index}
Expand All @@ -14,8 +16,8 @@
ALTER TABLE `series` ADD INDEX `title_index` GLOBAL ON (`title`);
```

Могут быть указаны все параметры вторичного индекса, описанные в команде [`CREATE TABLE`](../create_table/secondary_index.md)
Могут быть указаны все параметры векторного индекса, описанные в команде [`CREATE TABLE`](../create_table/vector_index.md)
Могут быть указаны все параметры [вторичного индекса](../../../../concepts/glossary.md#secondary-index), описанные в [команде](../create_table/secondary_index.md) `CREATE TABLE`.
Могут быть указаны все параметры [векторного индекса](../../../../concepts/glossary.md#vector-index), описанные в [команде](../create_table/vector_index.md) `CREATE TABLE`.

{% if backend_name == "YDB" and oss == true %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

{% include [not_allow_for_olap](../../../../_includes/not_allow_for_olap_note.md) %}

{% include [limitations](../../../../_includes/vector_index_limitations.md) %}

{% endif %}

{% note warning %}

Создание пустой таблицы с векторным индексом в настоящее время не имеет практического смысла, так как модификация данных в таблицах с векторными индексами пока не поддерживается.

Следует использовать `ALTER TABLE ... ADD INDEX` для добавления векторного индекса в существующую таблицу.
Следует использовать [команду](../alter_table/indexes.md) `ALTER TABLE ... ADD INDEX` для добавления векторного индекса в существующую таблицу.

{% endnote %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

{% include [OLAP_not_allow_text](../../../../_includes/not_allow_for_olap_text.md) %}

{% include [limitations](../../../../_includes/vector_index_limitations.md) %}

{% endnote %}

{% endif %}
Expand Down