From 939b67715c17ea1dcd09712b4281333419d774cd Mon Sep 17 00:00:00 2001 From: JSDu <306211150@qq.com> Date: Sun, 28 Apr 2024 22:55:43 +0800 Subject: [PATCH] fix/milvus will autoflush, manual flush is slowly (#1470) --- dbgpt/storage/vector_store/milvus_store.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dbgpt/storage/vector_store/milvus_store.py b/dbgpt/storage/vector_store/milvus_store.py index c03ede6d0..ea69b35fd 100644 --- a/dbgpt/storage/vector_store/milvus_store.py +++ b/dbgpt/storage/vector_store/milvus_store.py @@ -354,8 +354,7 @@ def _add_documents( res = self.col.insert( insert_list, partition_name=partition_name, timeout=timeout ) - # make sure data is searchable. - self.col.flush() + return res.primary_keys def load_document(self, chunks: List[Chunk]) -> List[str]: