How to keep primary key unchanged when copying one collection from Milvus to another with auto-id on #31943
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
It seems that when auto_id is set to True, upsert will fail if I want to update an item indexed by id. |
Beta Was this translation helpful? Give feedback.
-
In fact, by using milvus-backup restore, the auto-generated ids are copied into the new collection without any change. Yes, upsert cannot support collections with auto_id=true, this is as-designed in current versions. |
Beta Was this translation helpful? Give feedback.
-
@yhmo hi, yihua, |
Beta Was this translation helpful? Give feedback.
-
To update, I tried the steps in milvus-backup doc:
where db_c61caec2a5f64a9ca5b2869a3cb0843f is a collection with auto-id. |
Beta Was this translation helpful? Give feedback.
-
To explain, in my application scenario, I want return the ID to user, and then, user can get/query/update by that ID directly without manipulating IDs. And auto-id is perfect for this. |
Beta Was this translation helpful? Give feedback.
In fact, by using milvus-backup restore, the auto-generated ids are copied into the new collection without any change.
Yes, upsert cannot support collections with auto_id=true, this is as-designed in current versions.