mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-31 10:23:18 +00:00
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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user