code: def _bulk_op(self, record_id_iterator, op_type, index=None, doc_type=None):
          
          with self.create_producer() as producer:
              for rec in record_id_iterator:
                  producer.publish(dict(
                      id=str(rec),
                      op=op_type,
                      index=index,
                      doc_type=doc_type
                  ))
docs: Index record in Elasticsearch asynchronously.
  
          :param record_id_iterator: Iterator that yields record UUIDs.
          :param op_type: Indexing operation (one of ``index``, ``create``,
              ``delete`` or ``update``).
          :param index: The Elasticsearch index. (Default: ``None``)
          :param doc_type: The Elasticsearch doc_type. (Default: ``None``)