diff --git a/packages/service/common/vectorStore/pg/controller.ts b/packages/service/common/vectorStore/pg/controller.ts index 018ee753f..a2a51cbac 100644 --- a/packages/service/common/vectorStore/pg/controller.ts +++ b/packages/service/common/vectorStore/pg/controller.ts @@ -22,7 +22,11 @@ export async function initPg() { data_id VARCHAR(50) NOT NULL, createTime TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); - CREATE INDEX CONCURRENTLY IF NOT EXISTS vector_index ON ${PgDatasetTableName} USING hnsw (vector vector_ip_ops) WITH (m = 32, ef_construction = 64); + `); + + await PgClient.query(` + CREATE INDEX CONCURRENTLY IF NOT EXISTS vector_index ON ${PgDatasetTableName} + USING hnsw (vector vector_ip_ops) WITH (m = 32, ef_construction = 64); `); console.log('init pg successful');