You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
db.collection.insertMany() with the option "ordered = false" can be used to insert multiple documents while ignoring intermediate insertion errors due to duplicate errors. See https://www.mongodb.com/docs/manual/reference/method/db.collection.insertMany/#execution-of-operations : If ordered is set to false and an insert fails, the server continues inserting records. Documents may be reordered by mongod to increase performance. Applications should not depend on ordering of inserts if using an unordered insertMany().
The julia function insert_many(..., bulk_options=BSON("ordered" => false)) throws an exception although the non-duplicate documents have been inserted. The problem with throwing an exception here is that we loose access to the results which contains information about which documents have been inserted and which not.
The example shows that the non-duplicate documents have been added and the duplicate document has not been replaced as expected, although the insert_many function has thrown an exception.
The text was updated successfully, but these errors were encountered:
db.collection.insertMany() with the option "ordered = false" can be used to insert multiple documents while ignoring intermediate insertion errors due to duplicate errors. See https://www.mongodb.com/docs/manual/reference/method/db.collection.insertMany/#execution-of-operations :
If ordered is set to false and an insert fails, the server continues inserting records. Documents may be reordered by mongod to increase performance. Applications should not depend on ordering of inserts if using an unordered insertMany().
The julia function insert_many(..., bulk_options=BSON("ordered" => false)) throws an exception although the non-duplicate documents have been inserted. The problem with throwing an exception here is that we loose access to the results which contains information about which documents have been inserted and which not.
minimal example:
The example shows that the non-duplicate documents have been added and the duplicate document has not been replaced as expected, although the insert_many function has thrown an exception.
The text was updated successfully, but these errors were encountered: