community[patch]: Fix Milvus add texts when ids=None (#17021)

- **Description:** Fix Milvus add texts when ids=None (auto_id=True)

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
Jael Gu
2024-02-10 07:48:37 +08:00
committed by GitHub
parent 54c1fb3f25
commit c07c0da01a

View File

@@ -583,7 +583,9 @@ class Milvus(VectorStore):
# Grab end index
end = min(i + batch_size, total_count)
# Convert dict to list of lists batch for insertion
insert_list = [insert_dict[x][i:end] for x in self.fields]
insert_list = [
insert_dict[x][i:end] for x in self.fields if x in insert_dict
]
# Insert into the collection.
try:
res: Collection