Skip to content
Snippets Groups Projects
Unverified Commit ab367af7 authored by Michael David's avatar Michael David Committed by GitHub
Browse files

Fix milvus delete with ref_doc_ids when they don't exist (#11315)

parent f6ad23eb
Branches
Tags
No related merge requests found
......@@ -221,9 +221,10 @@ class MilvusVectorStore(VectorStore):
collection_name=self.collection_name,
filter=f"{self.doc_id_field} in [{','.join(doc_ids)}]",
)
ids = [entry["id"] for entry in entries]
self.milvusclient.delete(collection_name=self.collection_name, pks=ids)
logger.debug(f"Successfully deleted embedding with doc_id: {doc_ids}")
if len(entries) > 0:
ids = [entry["id"] for entry in entries]
self.milvusclient.delete(collection_name=self.collection_name, pks=ids)
logger.debug(f"Successfully deleted embedding with doc_id: {doc_ids}")
def query(self, query: VectorStoreQuery, **kwargs: Any) -> VectorStoreQueryResult:
"""Query index for top k most similar nodes.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment