class_docstr: Add indexing features to `datasets.Dataset`
class_docstr_tok: ["Add","indexing","features","to","`","datasets.Dataset","`"]
docstr: Add a text index using ElasticSearch for fast retrieval.
  
  Args:
      column (`str`): The column of the documents to add to the index.
      index_name (Optional `str`): The index_name/identifier of the index. This is the index name that is used to call `.get_nearest` or `.search`.
          By default it corresponds to `column`.
      host (Optional `str`, defaults to localhost):
          host of where ElasticSearch is running
      port (Optional `str`, defaults to 9200):
          port of where ElasticSearch is running
      es_client (Optional `elasticsearch.Elasticsearch`):
          The elasticsearch client used to create the index if host and port are None.
      es_index_name (Optional `str`): The elasticsearch index name used to create the index.
      es_index_config (Optional `dict`):
          The configuration of the elasticsearch index.
          Default config is:
  
  Config::
  
      {
          "settings": {
              "number_of_shards": 1,
              "analysis": {"analyzer": {"stop_standard": {"type": "standard", " stopwords": "_english_"}}},
          },
          "mappings": {
              "properties": {
                  "text": {
                      "type": "text",
                      "analyzer": "standard",
                      "similarity": "BM25"
                  },
              }
          },
      }
docstr_tok: ["Add","a","text","index","using","ElasticSearch","for","fast","retrieval",".","Args",":","column","(","`","str","`",")",":","The","column","of","the","documents","to","add","to","the","index",".","index_name","(","Optional","`","str","`",")",":","The","index_name\/identifier","of","the","index",".","This","is","the","index","name","that","is","used","to","call","`",".get_nearest","`","or","`",".search","`",".","By","default","it","corresponds","to","`","column","`",".","host","(","Optional","`","str","`",",","defaults","to","localhost",")",":","host","of","where","ElasticSearch","is","running","port","(","Optional","`","str","`",",","defaults","to","9200",")",":","port","of","where","ElasticSearch","is","running","es_client","(","Optional","`","elasticsearch.Elasticsearch","`",")",":","The","elasticsearch","client","used","to","create","the","index","if","host","and","port","are","None",".","es_index_name","(","Optional","`","str","`",")",":","The","elasticsearch","index","name","used","to","create","the","index",".","es_index_config","(","Optional","`","dict","`",")",":","The","configuration","of","the","elasticsearch","index",".","Default","config","is",":","Config",":",":","{","``","settings","''",":","{","``","number_of_shards","''",":","1",",","``","analysis","''",":","{","``","analyzer","''",":","{","``","stop_standard","''",":","{","``","type","''",":","``","standard","''",",","``","stopwords","''",":","``","_english_","''","}","}","}",",","}",",","``","mappings","''",":","{","``","properties","''",":","{","``","text","''",":","{","``","type","''",":","``","text","''",",","``","analyzer","''",":","``","standard","''",",","``","similarity","''",":","``","BM25","''","}",",","}","}",",","}"]
code: def add_elasticsearch_index(
      self,
      column: str,
      index_name: Optional[str] = None,
      host: Optional[str] = None,
      port: Optional[int] = None,
      es_client: Optional["Elasticsearch"] = None,
      es_index_name: Optional[str] = None,
      es_index_config: Optional[dict] = None,
  ):
      """Add a text index using ElasticSearch for fast retrieval.
  
      Args:
          column (`str`): The column of the documents to add to the index.
          index_name (Optional `str`): The index_name/identifier of the index. This is the index name that is used to call `.get_nearest` or `.search`.
              By default it corresponds to `column`.
          host (Optional `str`, defaults to localhost):
              host of where ElasticSearch is running
          port (Optional `str`, defaults to 9200):
              port of where ElasticSearch is running
          es_client (Optional `elasticsearch.Elasticsearch`):
              The elasticsearch client used to create the index if host and port are None.
          es_index_name (Optional `str`): The elasticsearch index name used to create the index.
          es_index_config (Optional `dict`):
              The configuration of the elasticsearch index.
              Default config is:
  
      Config::
  
          {
              "settings": {
                  "number_of_shards": 1,
                  "analysis": {"analyzer": {"stop_standard": {"type": "standard", " stopwords": "_english_"}}},
              },
              "mappings": {
                  "properties": {
                      "text": {
                          "type": "text",
                          "analyzer": "standard",
                          "similarity": "BM25"
                      },
                  }
              },
          }
      """
      index_name = index_name if index_name is not None else column
      es_index = ElasticSearchIndex(
          host=host,
          port=port,
          es_client=es_client,
          es_index_name=es_index_name,
          es_index_config=es_index_config,
      )
      es_index.add_documents(self, column=column)
      self._indexes[index_name] = es_index
  
imports: import importlib.util
  import os
  import tempfile
  from pathlib import PurePath
  from typing import TYPE_CHECKING, Dict, List, NamedTuple, Optional, Union
  import fsspec
  import numpy
  from .utils import logging
  from .utils import tqdm
label_desc: Use image node_id 12 for calling the IndexableMixin obj's underlying member method code with example usage: obj.add_elasticsearch_index(column, index_name, host, port, es_client, es_index_name, es_index_config) without return types