Skip to content

Commit 3cc6a33

Browse files
committed
Vector index limitations
1 parent 8bd84c1 commit 3cc6a33

File tree

10 files changed

+47
-24
lines changed

10 files changed

+47
-24
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% note alert %}
2+
3+
The functionality of vector indexes is available in the test mode in main. The stable version is planned for 25.1.
4+
5+
Currently not supported:
6+
7+
* modifying rows in tables with vector indexes
8+
* using bit vectors
9+
10+
These limitations may be removed in future versions.
11+
12+
{% endnote %}

ydb/docs/en/core/dev/vector-indexes.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Vector Indexes
22

3+
{% include [limitations](../_includes/vector_index_limitations.md) %}
4+
35
[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.
46

57
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.
@@ -120,11 +122,3 @@ It is recommended to check the optimality of the written query using [query stat
120122

121123
{% endnote %}
122124

123-
## Limitations of Vector Indexes {#limitations}
124-
125-
Currently not supported:
126-
127-
* modifying rows in tables with vector indexes
128-
* using bit vectors
129-
130-
These limitations may be removed in future versions.

ydb/docs/en/core/yql/reference/syntax/alter_table/indexes.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

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

7+
{% include [limitations](../../../../_includes/vector_index_limitations.md) %}
8+
79
{% endif %}
810

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

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

2022
{% if backend_name == "YDB" %}
2123

ydb/docs/en/core/yql/reference/syntax/create_table/vector_index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

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

5+
{% include [limitations](../../../../_includes/vector_index_limitations.md) %}
6+
57
{% note warning %}
68

79
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.
810

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

1113
{% endnote %}
1214

ydb/docs/en/core/yql/reference/syntax/select/vector_index.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

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

9+
{% include [limitations](../../../../_includes/vector_index_limitations.md) %}
10+
911
{% endnote %}
1012

1113
{% endif %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% note alert %}
2+
3+
Функционал векторных индексов доступен в тестовом режиме в main. В стабильной версии планируется в 25.1.
4+
5+
В настоящее время не поддерживается:
6+
7+
* изменение строк в таблицах с векторными индексами;
8+
* использование битовых векторов.
9+
10+
Эти ограничения будут сняты в будущих версиях.
11+
12+
{% endnote %}

ydb/docs/ru/core/dev/vector-indexes.md

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Векторные индексы
22

3+
{% include [limitations](../_includes/vector_index_limitations.md) %}
4+
35
[Векторные индексы](../concepts/glossary.md#vector-index) — это специализированные структуры данных, которые позволяют эффективно выполнять [векторный поиск](../concepts/vector_search.md) в многомерных пространствах. В отличие от [вторичных индексов](../concepts/glossary.md#secondary-index), которые оптимизируют поиск по равенству или диапазону, векторные индексы позволяют выполнять поиск по сходству на основе функций расстояния или схожести.
46

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

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

122-
{% endnote %}
123-
124-
## Ограничения векторных индексов {#limitations}
125-
126-
В настоящее время не поддерживается:
127-
128-
* изменение строк в таблицах с векторными индексами;
129-
* использование битовых векторов.
130-
131-
Эти ограничения могут быть сняты в будущих версиях.
124+
{% endnote %}

ydb/docs/ru/core/yql/reference/syntax/alter_table/indexes.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

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

7+
{% include [limitations](../../../../_includes/vector_index_limitations.md) %}
8+
79
{% endif %}
810

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

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

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

ydb/docs/ru/core/yql/reference/syntax/create_table/vector_index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44

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

7+
{% include [limitations](../../../../_includes/vector_index_limitations.md) %}
8+
79
{% endif %}
810

911
{% note warning %}
1012

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

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

1517
{% endnote %}
1618

ydb/docs/ru/core/yql/reference/syntax/select/vector_index.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

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

9+
{% include [limitations](../../../../_includes/vector_index_limitations.md) %}
10+
911
{% endnote %}
1012

1113
{% endif %}

0 commit comments

Comments
 (0)