mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Bugfix/implement missing delete method on pgvector (#3180)
implement missing delete method on pgvector
This commit is contained in:
@@ -191,6 +191,18 @@ class Postgres_VectorStores implements INode {
|
||||
return await similaritySearchVectorWithScore(query, k, tableName, postgresConnectionOptions, filter)
|
||||
}
|
||||
|
||||
vectorStore.delete = async (params: { ids: string[] }): Promise<void> => {
|
||||
const { ids } = params
|
||||
|
||||
if (ids?.length) {
|
||||
try {
|
||||
vectorStore.appDataSource.getRepository(vectorStore.documentEntity).delete(ids)
|
||||
} catch (e) {
|
||||
console.error('Failed to delete')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await recordManager.createSchema()
|
||||
|
||||
const res = await index({
|
||||
|
||||
Reference in New Issue
Block a user