Skip to content
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

cloud: Polish availability and limitation of Vector Search #19494

Open
wants to merge 4 commits into
base: release-7.5
Choose a base branch
from

Conversation

breezewish
Copy link
Member

@breezewish breezewish commented Nov 24, 2024

First-time contributors' checklist

What is changed, added or deleted? (Required)

Close #19373

  • To reduce confusions like Impossible to run standalone or offline autoflow#399, availability is now more precisely described, and some missing pages are also included.

    image
  • Polish the limitation part. The wording is now better choosen:

    • "Currently" means it is a temporary situation and may subject to change in future.
    • Removed all notes about TiFlash deployment, because it is by default in TiDB Serverless
    • Wording is carefully polished, becomes softer in many cases, in order to align with users' real requirements (what users do not care in most cases should not use rigorous words).
    image image image

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot ti-chi-bot bot added the missing-translation-status This PR does not have translation status info. label Nov 24, 2024
Copy link

ti-chi-bot bot commented Nov 24, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from breezewish, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 24, 2024
Copy link
Member

@Icemap Icemap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

@@ -222,7 +222,7 @@ Examples:
VEC_L2_NORM(vector)
```

Calculates the [L2 norm](https://en.wikipedia.org/wiki/Norm_(mathematics)) (Euclidean norm) of a vector using the following formula:
Calculates the [L2 norm](<https://en.wikipedia.org/wiki/Norm_(mathematics)>) (Euclidean norm) of a vector using the following formula:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why there is a pair of '<>' at the margin of the link?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is added by the formatter by default. Although the rendering is fine without this <>, I believe the formatter is right for good: https://stackoverflow.com/questions/13824669/how-do-you-write-a-link-containing-a-closing-bracket-in-markdown-syntax

Comment on lines +57 to +60
- **Connection Type** is set to `Public`.
- **Branch** is set to `main`.
- **Connect With** is set to `SQLAlchemy`.
- **Operating System** matches your environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe four spaces are correct.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatic formatting by the very recent version of Prettier. Considering that old prettier does not format like this, I guess this is an improvement.

Copy link
Member Author

@breezewish breezewish Nov 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the feature here, which is introduced 2 months ago: prettier/prettier@6168d1e

The format rule is as follows:

=====================================input======================================
- first line
    - second line indented
- third line
    - fourth line
        - fifth line
=====================================output=====================================
- first line
  - second line indented
- third line
  - fourth line
    - fifth line
================================================================================

@Icemap
Copy link
Member

Icemap commented Nov 24, 2024

We need to set the spaces for each tab in the same way as other documents.

>
> Vector data types are only available for [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless) clusters.
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
> TiDB Vector Search is only available for TiDB Self-Managed (>= v8.4.0) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).

@@ -9,25 +9,25 @@ This document lists the functions and operators available for Vector data types.

> **Note**
>
> Vector data types and these vector functions are only available for [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless) clusters.
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
> TiDB Vector Search is only available for TiDB Self-Managed (>= v8.4.0) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).

@@ -11,7 +11,7 @@ Throughout this tutorial, you will develop this AI application using [TiDB Vecto

> **Note**
>
> TiDB Vector Search is currently in beta and is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated) clusters.
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
> TiDB Vector Search is only available for TiDB Self-Managed (>= v8.4.0) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).

@@ -16,7 +16,7 @@ This tutorial demonstrates how to get started with TiDB Vector Search just using

> **Note**
>
> TiDB Vector Search is currently in beta and is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated) clusters.
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
> TiDB Vector Search is only available for TiDB Self-Managed (>= v8.4.0) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).

@@ -9,7 +9,7 @@ This tutorial walks you through how to use [Django](https://www.djangoproject.co

> **Note**
>
> TiDB Vector Search is currently in beta and is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated) clusters.
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> TiDB Vector Search is only available for TiDB (>= v8.4) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).
> TiDB Vector Search is only available for TiDB Self-Managed (>= v8.4.0) and [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless). It is not available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated).

- Currently, TiDB does not support modifying a vector column to other data types (such as `JSON` and `VARCHAR`).
- Vector columns cannot be used in primary keys, unique indexes or partition keys. To accelerate the vector search performance, use [Vector Search Index](/tidb-cloud/vector-search-index.md).
- Multiple vector columns in a table is allowed. However, there is [a limit of total number of columns in a table](/tidb-limitations.md#limitations-on-a-single-table).
- Currently TiDB does not support dropping a vector column with a vector index. To drop such column, drop the vector index first, then drop the vector column.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Currently TiDB does not support dropping a vector column with a vector index. To drop such column, drop the vector index first, then drop the vector column.
- Currently, TiDB does not support dropping a vector column with a vector index. To drop such a column, drop the vector index first, then drop the vector column.

- Multiple vector indexes in a table is allowed. However, there is [a limit of total number of indexes in a table](/tidb-limitations.md#limitations-on-a-single-table).
- Multiple vector indexes on the same column is allowed only if they use different distance functions.
- Currently only `VEC_COSINE_DISTANCE()` and `VEC_L2_DISTANCE()` are supported as the distance functions for vector indexes.
- Currently TiDB does not support dropping a vector column with a vector index. To drop such column, drop the vector index first, then drop the vector column.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Currently TiDB does not support dropping a vector column with a vector index. To drop such column, drop the vector index first, then drop the vector column.
- Currently, TiDB does not support dropping a vector column with a vector index. To drop such a column, drop the vector index first, then drop the vector column.

See [Vector search restrictions](/tidb-cloud/vector-search-index.md#restrictions).
- Vector index is used for vector search. It cannot accelerate other queries like range queries or equality queries. Thus, it is not possible to create a vector index on a non-vector column, or on multiple vector columns.
- Multiple vector indexes in a table is allowed. However, there is [a limit of total number of indexes in a table](/tidb-limitations.md#limitations-on-a-single-table).
- Multiple vector indexes on the same column is allowed only if they use different distance functions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Multiple vector indexes on the same column is allowed only if they use different distance functions.
- Creating multiple vector indexes on the same column is allowed only if they use different distance functions.

- Vector index is used for vector search. It cannot accelerate other queries like range queries or equality queries. Thus, it is not possible to create a vector index on a non-vector column, or on multiple vector columns.
- Multiple vector indexes in a table is allowed. However, there is [a limit of total number of indexes in a table](/tidb-limitations.md#limitations-on-a-single-table).
- Multiple vector indexes on the same column is allowed only if they use different distance functions.
- Currently only `VEC_COSINE_DISTANCE()` and `VEC_L2_DISTANCE()` are supported as the distance functions for vector indexes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Currently only `VEC_COSINE_DISTANCE()` and `VEC_L2_DISTANCE()` are supported as the distance functions for vector indexes.
- Currently, only `VEC_COSINE_DISTANCE()` and `VEC_L2_DISTANCE()` are supported as the distance functions for vector indexes.

- Multiple vector indexes on the same column is allowed only if they use different distance functions.
- Currently only `VEC_COSINE_DISTANCE()` and `VEC_L2_DISTANCE()` are supported as the distance functions for vector indexes.
- Currently TiDB does not support dropping a vector column with a vector index. To drop such column, drop the vector index first, then drop the vector column.
- Currently TiDB does not support setting vector index as [invisible](/sql-statements/sql-statement-alter-index.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Currently TiDB does not support setting vector index as [invisible](/sql-statements/sql-statement-alter-index.md).
- Currently, TiDB does not support setting vector index as [invisible](/sql-statements/sql-statement-alter-index.md).

github-actions bot pushed a commit to qiancai/pingcap-docsite-preview that referenced this pull request Nov 25, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing-translation-status This PR does not have translation status info. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants