fix: qdrant

This commit is contained in:
2026-03-08 01:36:14 +01:00
parent 1dc52da677
commit c804b051e0
5 changed files with 1 additions and 161 deletions

View File

@@ -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.