Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% note alert %}
{% note warning %}

{% include [codec_zstd_allow_for_olap_text](codec_zstd_allow_for_olap_text.md) %}

Expand Down
2 changes: 1 addition & 1 deletion ydb/docs/en/core/_includes/only_allow_for_olap_note.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% if oss == true and backend_name == "YDB" %}

{% note alert %}
{% note warning %}

{% include [only_allow_for_olap_text](only_allow_for_olap_text.md) %}

Expand Down
2 changes: 1 addition & 1 deletion ydb/docs/en/core/_includes/only_allow_for_oltp_note.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% if oss == true and backend_name == "YDB" %}

{% note alert %}
{% note warning %}

{% include [only_allow_for_oltp_text](only_allow_for_oltp_text.md) %}

Expand Down
10 changes: 2 additions & 8 deletions ydb/docs/en/core/yql/reference/syntax/alter_table/indexes.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Adding, removing, and renaming a index

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

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

{% endif %}

## Adding an index {#add-index}

`ADD INDEX` — adds an index with the specified name and type for a given set of columns. Grammar:
Expand Down Expand Up @@ -35,6 +29,8 @@ You can also add a secondary index using the {{ ydb-short-name }} CLI [table ind

{% endif %}

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

### Examples

A regular secondary index:
Expand Down Expand Up @@ -89,7 +85,6 @@ ALTER TABLE <table_name> ALTER INDEX <index_name> SET (<setting_name_1> = <value

{% note info %}


These settings cannot be reset.

{% endnote %}
Expand Down Expand Up @@ -140,7 +135,6 @@ Replacement of atomic indexes under load is supported by the command [{{ ydb-cli

Example of index renaming:


```yql
ALTER TABLE `series` RENAME INDEX `title_index` TO `title_index_new`;
```
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# INDEX

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

The INDEX construct is used to define a {% if concept_secondary_index %}[secondary index]({{ concept_secondary_index }}){% else %}secondary index{% endif %} in a [row-oriented](../../../../concepts/datamodel/table.md#row-oriented-tables) table:

```yql
Expand All @@ -23,6 +21,8 @@ where:

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

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

## Example

```yql
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Vector index

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

[Vector index](../../../../concepts/glossary.md#vector-index) in [row-oriented](../../../../concepts/datamodel/table.md#row-oriented-tables) tables is created using the same syntax as [secondary indexes](secondary_index.md), by specifying `vector_kmeans_tree` as the index type. Subset of syntax available for vector indexes:

```yql
Expand Down Expand Up @@ -34,6 +32,8 @@ Where:

{% endnote %}

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

## Example

```yql
Expand Down
16 changes: 2 additions & 14 deletions ydb/docs/en/core/yql/reference/syntax/select/secondary_index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# VIEW (INDEX)

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

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

{% note warning %}

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

{% endnote %}

{% endif %}

{% endif %}

To make a `SELECT` by secondary index of row-oriented table statement, use the following:

```yql
Expand All @@ -22,6 +8,8 @@ SELECT *
WHERE …
```

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

## Examples

* Select all the fields from the `series` row-oriented table using the `views_index` index with the `views >=someValue` criteria:
Expand Down
10 changes: 0 additions & 10 deletions ydb/docs/en/core/yql/reference/syntax/select/vector_index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# VIEW (Vector index)

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

{% note warning %}

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

{% endnote %}

{% endif %}

To select data from a row-oriented table using a [vector index](../../../../concepts/glossary.md#vector-index), use the following statements:

```yql
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% note alert %}
{% note warning %}

{% include [codec_zstd_allow_for_olap_text](codec_zstd_allow_for_olap_text.md) %}

Expand Down
2 changes: 1 addition & 1 deletion ydb/docs/ru/core/_includes/not_allow_for_olap_note.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% if oss == true and backend_name == "YDB" %}

{% note alert %}
{% note warning %}

{% include [not_allow_for_olap_text](not_allow_for_olap_text.md) %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% note alert %}
{% note warning %}

{% include [not_allow_for_olap_text](not_allow_for_olap_text.md) %}

Expand Down
2 changes: 1 addition & 1 deletion ydb/docs/ru/core/_includes/not_allow_for_oltp_note.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% if oss == true and backend_name == "YDB" %}

{% note alert %}
{% note warning %}

{% include [not_allow_for_olap_text](not_allow_for_oltp_text.md) %}

Expand Down
2 changes: 1 addition & 1 deletion ydb/docs/ru/core/_includes/only_allow_for_olap_note.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% if oss == true and backend_name == "YDB" %}

{% note alert %}
{% note warning %}

{% include [only_allow_for_olap_text](only_allow_for_olap_text.md) %}

Expand Down
2 changes: 1 addition & 1 deletion ydb/docs/ru/core/_includes/only_allow_for_oltp_note.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% if oss == true and backend_name == "YDB" %}

{% note alert %}
{% note warning %}

{% include [only_allow_for_oltp_text](only_allow_for_oltp_text.md) %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Добавление, удаление и переименование индекса

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

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

{% endif %}

## Добавление индекса {#add-index}

`ADD INDEX` — добавляет индекс с указанным именем и типом для заданного набора колонок в {% if backend_name == "YDB" and oss == true %}строковых таблицах.{% else %}таблицах.{% endif %} Грамматика:
Expand Down Expand Up @@ -35,6 +29,8 @@ ALTER TABLE `<table_name>`

{% endif %}

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

### Примеры

Вторичный индекс:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# INDEX

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

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

{% endif %}

Конструкция `INDEX` используется для определения {% if concept_secondary_index %}[вторичного индекса]({{ concept_secondary_index }}){% else %}вторичного индекса{% endif %} {% if backend_name == "YDB" and oss == true %}для [строковых](../../../../concepts/datamodel/table.md#row-oriented-tables) таблиц{% else %}на таблице{% endif %}:

```yql
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Векторный индекс

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

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

{% endif %}

{% if backend_name == 'YDB' %}[Векторный индекс](../../../../concepts/glossary.md#vector-index){% else %}векторный индекс{% endif %} в {% if backend_name == 'YDB' %}[строковых](../../../../concepts/datamodel/table.md#row-oriented-tables){% else %}строковых{% endif %} таблицах создаётся с помощью того же синтаксиса, что и [вторичные индексы](secondary_index.md), при указании `vector_kmeans_tree` в качестве типа индекса. Подмножество доступного для векторных индексов синтаксиса:

```yql
Expand Down Expand Up @@ -38,6 +32,8 @@ CREATE TABLE `<table_name>` (

{% endnote %}

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

## Пример

```yql
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# VIEW (INDEX)

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

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

{% endif %}

Чтобы сделать запрос `SELECT` по вторичному индексу строковой таблицы, используйте конструкцию:

```yql
Expand All @@ -14,6 +8,8 @@ SELECT *
WHERE …
```

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

## Примеры

Выбрать все поля из строковой таблицы `series` по индексу `views_index` с условием `views >= someValue`:
Expand Down
10 changes: 0 additions & 10 deletions ydb/docs/ru/core/yql/reference/syntax/select/vector_index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# VIEW (Векторный индекс)

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

{% note warning %}

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

{% endnote %}

{% endif %}

Для выполнения запроса `SELECT` с использованием [векторного индекса](../../../../concepts/glossary.md#vector-index) в строчно-ориентированной таблице используйте следующий синтаксис:

```yql
Expand Down
Loading