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

examples: use new vector index syntax #70

Merged
merged 1 commit into from
Nov 15, 2024
Merged

examples: use new vector index syntax #70

merged 1 commit into from
Nov 15, 2024

Conversation

wd0517
Copy link
Collaborator

@wd0517 wd0517 commented Nov 15, 2024

No description provided.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -57,7 +57,6 @@ class Cache(SQLModel, table=True):
sa_column=Column(
VectorType(768),
default=None,
Copy link
Member

Choose a reason for hiding this comment

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

also using create_vector_index instead?

Copy link
Collaborator Author

@wd0517 wd0517 Nov 15, 2024

Choose a reason for hiding this comment

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

Vector index syntax is strange, I suggest only show it in orm examples. Core team will introduce new vector index creating syntax later.

Copy link
Member

@breezewish breezewish Nov 15, 2024

Choose a reason for hiding this comment

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

I guess there might be no high-priority plan of introducing a new syntax in recent versions, because ORM users are already using a good encapsulated one. Even after a new syntax is introduced I don't think we could avoid using Adaptor in all ORMs, because of the syntax prefix like ADD VECTOR INDEX. For this reason I guess the new syntax is mainly for ORM adaptors to have a simple implementation (while taking care of TiFlash multi replicas). How users use the ORM might not change, or at least it is not the goal.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This PR introduced a new VectorIndex which can replace current VectorAdapter.

@wd0517 wd0517 merged commit 3740022 into main Nov 15, 2024
2 checks passed
@wd0517 wd0517 deleted the wd/example branch November 15, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants