def update(self, safe_update=True, upsert=False, **update):
        if pymongo.version < '1.1.1':
            raise OperationError('update() method requires PyMongo 1.1.1+')

        update = QuerySet._transform_update(self._document, **update)
        try:
            self._collection.update(self._query, update, safe=safe_update, 
                                    upsert=upsert, multi=True)
        except pymongo.errors.OperationFailure, err:
            if unicode(err) == u'multi not coded yet':
                message = u'update() method requires MongoDB 1.1.3+'
                raise OperationError(message)
            raise OperationError(u'Update failed (%s)' % unicode(err))
Perform an atomic update on the fields matched by the query.
dataset/ETHPy150Open aparo/django-elasticsearch/django_elasticsearch/manager.py/QuerySet.update