fix annotation failed when embedding model and dimension changed (#17347)

This commit is contained in:
Jyong
2025-04-03 13:03:22 +08:00
committed by GitHub
parent 16c722d1d8
commit 48c2168dff
2 changed files with 22 additions and 1 deletions

View File

@@ -46,7 +46,7 @@ def disable_annotation_reply_task(job_id: str, app_id: str, tenant_id: str):
try:
if annotations_count > 0:
vector = Vector(dataset, attributes=["doc_id", "annotation_id", "app_id"])
vector.delete_by_metadata_field("app_id", app_id)
vector.delete()
except Exception:
logging.exception("Delete annotation index failed when annotation deleted.")
redis_client.setex(disable_app_annotation_job_key, 600, "completed")