feat: vector store support oceanbase (#4356)

* feat: vector store support oceanbase

* chore(config): Rename pgHNSWEfSearch to hnswEfSearch to work for pg and oceanbase both
This commit is contained in:
诸岳
2025-03-27 18:39:49 +08:00
committed by GitHub
parent ccf9f5be2e
commit 14895bbcfd
16 changed files with 451 additions and 13 deletions

View File

@@ -187,7 +187,7 @@ export class PgVectorCtrl {
try {
const results: any = await PgClient.query(
`BEGIN;
SET LOCAL hnsw.ef_search = ${global.systemEnv?.pgHNSWEfSearch || 100};
SET LOCAL hnsw.ef_search = ${global.systemEnv?.hnswEfSearch || 100};
SET LOCAL hnsw.iterative_scan = relaxed_order;
WITH relaxed_results AS MATERIALIZED (
select id, collection_id, vector <#> '[${vector}]' AS score