@classmethod
    def bulk_index(cls, documents, id_field='id', es=None, index=None):
        if es is None:
            es = cls.get_es()

        if index is None:
            index = cls.get_index()

        documents = (dict(d, _id=d[id_field]) for d in documents)

        bulk_index(
            es,
            documents,
            index=index,
            doc_type=cls.get_mapping_type_name(),
            raise_on_error=True
        )
Adds or updates a batch of documents.
dataset/ETHPy150Open mozilla/elasticutils/elasticutils/__init__.py/Indexable.bulk_index