I just tried to create an index via Sqlalchemy, following the instructions in the readme:
idx = sql.Index(
'...', ,
postgresql_using='hnsw',
postgresql_with={'m': 16, 'ef_construction': 64},
postgresql_ops={'embedding': 'vector_cosine_ops'}
)
idx.create(bind=...)
which ends up running (notice that the vector_cosine_ops didn't make it into the statement):
'CREATE INDEX idx_617bbefd304a4d1abbef9cfb75012fb9_0 ON tbl_617bbefd304a4d1abbef9cfb75012fb9 USING hnsw (idx_0_col) WITH (m = 16, ef_construction = 64)'
and I'm getting the following error:
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedObject) data type vector has no default operator class for access method "hnsw"
I just tried to create an index via Sqlalchemy, following the instructions in the readme: idx = sql.Index( '...',,
postgresql_using='hnsw',
postgresql_with={'m': 16, 'ef_construction': 64},
postgresql_ops={'embedding': 'vector_cosine_ops'}
)
idx.create(bind=...)
which ends up running (notice that the vector_cosine_ops didn't make it into the statement): 'CREATE INDEX idx_617bbefd304a4d1abbef9cfb75012fb9_0 ON tbl_617bbefd304a4d1abbef9cfb75012fb9 USING hnsw (idx_0_col) WITH (m = 16, ef_construction = 64)'
and I'm getting the following error: sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedObject) data type vector has no default operator class for access method "hnsw"
This is on pgvector 0.2.5