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
CREATEINDEXix_chunks_vectorON chunks
USING hnsw (CAST(vector AS HALFVEC(3072)))
WITH (m =16, ef_construction =64)
As you can see, the operations are not inserted correctly into the query: hnsw (CAST(vector AS HALFVEC(3072))) should be hnsw (CAST(vector AS HALFVEC(3072)) halfvec_cosine_ops)
2. Manually altering the DLL results in a mismatch next time I generate a migration
If I manually correct the query to be:
CREATEINDEXix_chunks_vectorON chunks
USING hnsw (CAST(vector AS HALFVEC(3072)) halfvec_cosine_ops)
WITH (m =16, ef_construction =64)
The next time I run alembic autogenerate it will try to remove this index, and create one with the wrong DDL again:
Hi,
I'm facing a few issues with using Alembic and SQLAlchemy when creating halfvec indices.
1. The DLL generated by alembic given the index is invalid
My index:
Which translates to Alembic as:
Which in turn becomes:
As you can see, the operations are not inserted correctly into the query:
hnsw (CAST(vector AS HALFVEC(3072)))
should behnsw (CAST(vector AS HALFVEC(3072)) halfvec_cosine_ops)
2. Manually altering the DLL results in a mismatch next time I generate a migration
If I manually correct the query to be:
The next time I run alembic autogenerate it will try to remove this index, and create one with the wrong DDL again:
I'm struggling to find a way to define the index appropriately to avoid this.
Thanks.
For context, here is my ORM table definition:
I am using:
The text was updated successfully, but these errors were encountered: