def update_records(self, qs, batch_size=<NUM_LIT:1000>, **kwargs):
tmp = {}<EOL>for key, value in kwargs.items():<EOL><INDENT>name = self.__translate_fields.get(key, None)<EOL>if name:<EOL><INDENT>tmp[name] = value<EOL><DEDENT><DEDENT>batch = []<EOL>objectsIDs = qs.only(self.custom_objectID).values_list(<EOL>self.custom_objectID, flat=True)<EOL>for elt in objectsIDs:<EOL><INDENT>tmp['<STR_LIT>'] = elt<EOL>batch.append(dict(tmp))<EOL>if len(batch) >= batch_size:<EOL><INDENT>self.__index.partial_update_objects(batch)<EOL>batch = []<EOL><DEDENT><DEDENT>if len(batch) > <NUM_LIT:0>:<EOL><INDENT>self.__index.partial_update_objects(batch)<EOL><DEDENT>
Updates multiple records.

This method is optimized for speed. It takes a QuerySet and the same
arguments as QuerySet.update(). Optionnaly, you can specify the size
of the batch send to Algolia with batch_size (default to 1000).

>>> from algoliasearch_django import update_records
>>> qs = MyModel.objects.filter(myField=False)
>>> update_records(MyModel, qs, myField=True)
>>> qs.update(myField=True)