You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. (Optional) Create a vector index on the sparse vector column.
CREATE INDEX ON documents USING vectors (embedding svector\_dot\_ops); \-- for pgvecto.rs users
CREATE INDEX ON documents USING ivfflat (embedding sparsevec\_ip\_ops); \-- for pgvector users
but I don't believe there is ivfflat for sparse vectors with pgvector since:
SELECT am.amname, opc.opcname, opc.opcintype::regtype
FROM pg_am am
JOIN pg_opclass opc ON opc.opcmethod = am.oid
WHERE opc.opcintype::regtype::text = 'sparsevec'
ORDER BY am.amname, opc.opcname;
amname | opcname | opcintype
--------+----------------------+-----------
btree | sparsevec_ops | sparsevec
hnsw | sparsevec_cosine_ops | sparsevec
hnsw | sparsevec_ip_ops | sparsevec
hnsw | sparsevec_l1_ops | sparsevec
hnsw | sparsevec_l2_ops | sparsevec
Is there a workaround OR does one have to add the pgvecto.rs extension? Thanks
The text was updated successfully, but these errors were encountered:
Documents suggest
but I don't believe there is ivfflat for sparse vectors with pgvector since:
Is there a workaround OR does one have to add the pgvecto.rs extension? Thanks
The text was updated successfully, but these errors were encountered: