Load and Insert data #32723
-
I once saw a discussion(cannot find now) from here that the safest way of inserting data into the collection and search is: Is it still the same process or has it changed? I am asking since the client.create_collection() loads collection before data is inserted. I know that you can still insert data after the load but am not sure what it means by the "safe way". |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Just make sure create_index() is called before load(), and load() is called before search(). The pymilvus MilvusClient is using the workflow C |
Beta Was this translation helpful? Give feedback.
Just make sure create_index() is called before load(), and load() is called before search().
insert() can be called anywhere.
All of the following workflows are allowed:
(A) create_collection --> insert() --> create_index() --> load() --> search()
(B) create_collection --> create_index() --> insert() --> load() --> search()
(C) create_collection --> create_index() --> load() --> insert() --> search()
(D) create_collection --> insert() --> create_index() --> insert() --> load() --> insert() --> search()
The pymilvus MilvusClient is using the workflow C
https://github.com/milvus-io/pymilvus/blob/f2fac2be3922126c7163936757b31153e7773358/pymilvus/milvus_client/milvus_client.py#L134