Skip to content

Commit

Permalink
⚡️ fix(perf): flush not needed every insert per docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mxchinegod committed Mar 8, 2024
1 parent c7a5cb7 commit 7e09b25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions magnet/ize/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ async def index(self, payload, msg, verbose=False, field=None, charge=False, ins
self.db.collection.insert([
[payload.document], [payload.text], [payload.embedding]
])
self.db.collection.flush(collection_name_array=[
self.config['INDEX']])
# self.db.collection.flush(collection_name_array=[self.config['INDEX']]) # https://milvus.io/docs/v1.1.1/flush_python.md#:~:text=Milvus%20also%20performs%20an%20automatic,fixed%20interval%20(1%20second).&text=After%20calling%20delete%20%2C%20you%20can,data%20is%20no%20longer%20recoverable.
if charge:
payload = EmbeddingPayload(
model=self.config['MODEL'],
Expand Down

0 comments on commit 7e09b25

Please sign in to comment.