Custom Batch Insert not Working #28734
-
|
I am using Milvus DB 2.3 hosted locally on a VM. I have introduced batching while inserting (as shown above) to know the progress of how much it is inserting, Example Logs: When inserting in Batches of 1000: When inserting with batch 5000: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Number of Entries in Collection : if you are using num_entities, this might be accurate. Better way to do it is to query with count(*) as output field. |
Beta Was this translation helpful? Give feedback.
-
|
No need to call create_index() every time in the insert_data() method. You can call create_index() once after alll the entities are inserted. I could not reproduce your issue with the following script. The row count is correct after insertions. I didn't change the logic of the insert_data() method. The outputs: |
Beta Was this translation helpful? Give feedback.
there might be some data not flushed yet.
the num_entities is not accurate so I recoomend you to use count(*) in order to make sure if your insert success or not.