mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-30 19:05:10 +08:00
add meta.doc_id index for tidb (#4963)
This commit is contained in:
parent
02e4de5166
commit
237b8fe3d9
@ -84,6 +84,8 @@ class TiDBVector(BaseVector):
|
||||
id CHAR(36) PRIMARY KEY,
|
||||
text TEXT NOT NULL,
|
||||
meta JSON NOT NULL,
|
||||
doc_id VARCHAR(64) AS (JSON_UNQUOTE(JSON_EXTRACT(meta, '$.doc_id'))) STORED,
|
||||
KEY (doc_id),
|
||||
vector VECTOR<FLOAT>({dimension}) NOT NULL COMMENT "hnsw(distance={self._distance_func})",
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user