Fast or Bulk Upsert in pymongo

前端 未结 6 1941
逝去的感伤
逝去的感伤 2020-11-29 02:07

How can I do a bulk upsert in pymongo? I want to Update a bunch of entries and doing them one at a time is very slow.

The answer to an almost identical question is h

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 02:43

    You can update all documents that match your query spec using multi=True.

    There is a bug here about doing a batch of commands the way you want.

提交回复
热议问题