It looks like MonogoDB does not support batch upsert. Is this Correct?
If not, how would you go about adding batch upsert with the existing API which is the most efficient? Does batch upsert even make sense for mongo db?
If you upgrade to MongoDB 2.6 you can take advantage of the new Bulk operations:
Bulk.find(<query>).upsert().update(<update>);
Bulk.find(<query>).upsert().updateOne(<update>);
Bulk.find(<query>).upsert().replaceOne(<replacement>);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With