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

bug with sparse vector index creation #1249

Closed
louisLT opened this issue Jun 7, 2024 · 1 comment · Fixed by #1252
Closed

bug with sparse vector index creation #1249

louisLT opened this issue Jun 7, 2024 · 1 comment · Fixed by #1252

Comments

@louisLT
Copy link
Contributor

louisLT commented Jun 7, 2024

Bug Description
On docker image 0.7.3
The simple example given in the documentation for creating a sparse vector index produces an error.

How To Reproduce

CREATE TABLE items (id bigserial PRIMARY KEY, embedding sparsevec(5));
INSERT INTO items (embedding) VALUES ('{1:1,3:2,5:3}/5'), ('{1:4,3:5,5:6}/5');
CREATE INDEX ON items USING hnsw (embedding vector_l2_ops);

=> SQL Error [42804]: ERROR: operator class "vector_l2_ops" does not accept data type sparsevec

@rebasedming
Copy link
Collaborator

Woops, this is an issue with the documentation. The correct distance function for sparse vectors should be sparsevec_l2_ops.

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 a pull request may close this issue.

2 participants