Milvus vectorstore: fix pass ids as argument after upsert (#23761)

**Description**: Milvus vectorstore supports both `add_documents` via
the base class and `upsert` method which deletes and re-adds documents
based on their ids

**Issue**: Due to mismatch in the interfaces the ids used by `upsert`
are neglected in `add_documents`, as `ids` are passed as argument in
`upsert` but via `kwargs` is `add_documents`

This caused exceptions and inconsistency in the DB, tested with
`auto_id=False`

**Fix**: pass `ids` via `kwargs` to `add_documents`
This commit is contained in:
antonpibm 2024-07-02 16:45:30 +03:00 committed by GitHub
parent d084172b63
commit ffde8a6a09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1076,6 +1076,7 @@ class Milvus(VectorStore):
return None
if ids is not None and len(ids):
kwargs["ids"] = ids
try:
self.delete(ids=ids)
except MilvusException: