On Thursday, May 5, 2016 at 4:29:11 PM UTC-7, Valentin Kuznetsov wrote:
I'm trying to find out a way how I can insert bunch of docs via bulk
python API, e.g. insert_many, where I may have a duplicate in my docs.
Current behavior stop when it encounters a duplicate error and it does not
proceed afterwards because of thrown exception. I'd like to avoid that
behavior and I want to bulk succeed and just skip duplicates. Here is a
from pymongo import MongoClient, DESCENDING
from pymongo.errors import BulkWriteError