I have some records and am trying to insert_many
using the following with pymongo:
db.collection.insert_many(records, ordered=False)
I know from this answer that setting ordered=False
should allow me to skip duplicates, and I know from this answer that if there are duplicates within the list itself that it will throw the error. But there are no duplicates within the list being bulk written, and I'm still getting E11000 duplicate key error collection.
Am I doing something else wrong?