Return count of inserted/updated records for BulkWrite and collection.insertMany( with duplicates)
On success, BulkWrite returns a null response as mentioned in the documentation - https://www.mongodb.com/docs/atlas/app-services/functions/mongodb/api/#collection.bulkwrite--. Can you please send correct response details ( no. of records inserted, no. of records updated ) ? The functionality works correctly but we need correct details returned for debugging issues instead of making a redundant find call to check the results.
When inserting with duplicates, mongo inserts unique records successfully and discards duplicates. However, in the response sent, it does not specify the number of successfully inserted records and the count of duplicates, whereas, this information is returned in normal mongo SDK insert
Mongo support ticket raised for the same - https://support.mongodb.com/case/00998345