def update(self, **kwargs):
query = self._build_query()<EOL>connection = get_es_connection(self.es_url, self.es_kwargs)<EOL>results = connection.search(query, indices=self.index, doc_types=self.type,<EOL>model=self.model, scan=True)<EOL>for item in results:<EOL><INDENT>item.update(kwargs)<EOL>item.save(bulk=True)<EOL><DEDENT>connection.flush_bulk(True)<EOL>self._result_cache = None<EOL>
Updates all elements in the current QuerySet, setting all the given
fields to the appropriate values.