'Index of a bunch of documents.'

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

    es = (es or cls.get_es())
    index = (index or cls.get_index())
    type = cls.get_mapping_type_name()
    actions = [{'_index': index, '_type': type, '_id': d['id'], '_source': d} for d in documents]
    helpers.bulk(es, actions)
