'Updates all elements in the current QuerySet, setting all the given
fields to the appropriate values.'

def update(self, **kwargs):

    query = self._build_query()
    connection = get_es_connection(self.es_url, self.es_kwargs)
    results = connection.search(query, indices=self.index, doc_types=self.type, model=self.model, scan=True)
    for item in results:
        item.update(kwargs)
        item.save(bulk=True)
    connection.flush_bulk(True)
    self._result_cache = None
