2024-12-30 14:06:32 +01:00
|
|
|
|
|
|
|
CREATE EXTENSION IF NOT EXISTS vector;
|
|
|
|
|
|
|
|
CREATE TABLE doc_embedding (
|
|
|
|
domain VARCHAR(500) NOT NULL,
|
|
|
|
path VARCHAR(1000) NOT NULL,
|
|
|
|
ver VARCHAR(10) NOT NULL,
|
2024-12-31 02:03:03 +01:00
|
|
|
chunk INTEGER NOT NULL,
|
2024-12-30 14:06:32 +01:00
|
|
|
embed_mxbai_embed_large vector(1024) NOT NULL,
|
2024-12-31 02:03:03 +01:00
|
|
|
PRIMARY KEY (domain, path, ver, chunk)
|
2025-01-02 19:00:47 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX ON doc_embedding USING ivfflat (embed_mxbai_embed_large vector_cosine_ops) WITH (lists = 200);
|