title: Pymongo : insert_many + unique index
body: <p>I want to <code>insert_many()</code> documents in my collection. Some of them may have the same key/value pair (<code>screen_name</code> in my example) than existing documents inside the collection. I have a unique index set on this key, therefore I get an error. </p>
  
  <pre><code>my_collection.create_index("screen_name", unique = True)
  
  my_collection.insert_one({"screen_name":"user1", "foobar":"lalala"})
  # no problem
  
  to_insert = [
      {"screen_name":"user1", "foobar":"foo"}, 
      {"screen_name":"user2", "foobar":"bar"}
  ]
  my_collection.insert_many(to_insert)
  
  # error : 
  # File "C:\Program Files\Python\Anaconda3\lib\site-packages\pymongo\bulk.py", line 331, in execute_command 
  # raise BulkWriteError(full_result)
  # 
  # BulkWriteError: batch op errors occurred
  </code></pre>
  
  <p>I'd like to :</p>
  
  <ol>
  <li>Not get an error</li>
  <li>Not change the already existing documents (here <code>{"screen_name":"user1", "foobar":"lalala"}</code>)</li>
  <li>Insert all the non-already existing documents (here, <code>{"screen_name":"user2", "foobar":"bar"}</code>)</li>
  </ol>
  
  <hr>
  
  <p><strong>Edit :</strong> As someone said in comment "this question is asking how to do a bulk insert and ignore unique-index errors, while still inserting the successful records. Thus it's not a duplicate with the question how do I do bulk insert". Please reopen it.</p>