class_docstr: Index csvs in Elasticsearch
docstr: send csv to ES index
docstr_tok: ["send","csv","to","ES","index"]
code: def index(self):
      """send csv to ES index"""
      self.logger.info("Setting up Elasticsearch index...")
      elastic = Elasticsearch(
          host=self.host, port=self.port, timeout=10000
      )
      try:
          self.logger.info("Creating index %s..." % self.index_name)
          elastic.indices.create(self.index_name, self.mapping)
      except RequestError:
          self.logger.info("Index already exists, skipping...")
  
      self.logger.info("Indexing %s..." % self.file)
      act = (
          self.format(passage, cid=cid)
          for cid, passage in self.csv_generator()
      )
      bulk(elastic, actions=act)
  
file_path: nboost/nboost/indexers/es.py
imports: from typing import Dict
  from elasticsearch.exceptions import RequestError
  from elasticsearch.helpers import bulk
  from elasticsearch import Elasticsearch
  from nboost.indexers.base import BaseIndexer
label_desc: Use image node_id 3 for calling the ESIndexer obj's underlying member method code with example usage: obj.index() without return types