Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenliang123 committed Dec 24, 2024
1 parent c9fb21f commit 297116a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/core/rag/datasource/vdb/tidb_vector/tidb_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ def _create_collection(self, dimension: int):
create_time DATETIME DEFAULT CURRENT_TIMESTAMP,
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
KEY (doc_id),
VECTOR INDEX idx_vector ((VEC_COSINE_DISTANCE(vector)))
VECTOR INDEX idx_vector ((VEC_COSINE_DISTANCE(vector))) USING HNSW
);
""")
session.execute(create_statement)
# tidb vector not support 'CREATE/ADD INDEX' now
session.commit()
redis_client.set(collection_exist_cache_key, 1, ex=3600)

Expand Down

0 comments on commit 297116a

Please sign in to comment.