fix: qdrant
This commit is contained in:
@@ -152,31 +152,6 @@ export async function deleteProductVector(id: string | number) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete knowledge chunks by their source Media ID
|
||||
*/
|
||||
export async function deleteKnowledgeByMediaId(mediaId: string | number) {
|
||||
try {
|
||||
await ensureCollection();
|
||||
await qdrant.delete(COLLECTION_NAME, {
|
||||
wait: true,
|
||||
filter: {
|
||||
must: [
|
||||
{
|
||||
key: 'mediaId',
|
||||
match: {
|
||||
value: mediaId,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
console.log(`Successfully deleted Qdrant chunks for Media ID: ${mediaId}`);
|
||||
} catch (error) {
|
||||
console.error('Error deleting knowledge by Media ID from Qdrant:', error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Search products in Qdrant.
|
||||
* Results are cached in Redis for 30 minutes keyed by query text.
|
||||
|
||||
Reference in New Issue
Block a user