class_docstr: Primary DataFrame-based loading data from elastic search interface,
  defining API to read data from ES to DataFrame.
docstr: Write the Spark DataFrame to elastic search.
  
  :param esConfig: Dictionary which represents configuration for
         elastic search(eg. ip, port etc).
  :param esResource: resource file in elastic search.
  :param df: Spark DataFrame that will be saved.
code: def write_df(esConfig, esResource, df):
      """
      Write the Spark DataFrame to elastic search.
  
      :param esConfig: Dictionary which represents configuration for
             elastic search(eg. ip, port etc).
      :param esResource: resource file in elastic search.
      :param df: Spark DataFrame that will be saved.
      """
      wdf = df.write.format("org.elasticsearch.spark.sql").option(
          "es.resource", esResource
      )
  
      for key in esConfig:
          wdf.option(key, esConfig[key])
  
      wdf.save()
  
file_path: BigDL/python/orca/src/bigdl/orca/data/elastic_search.py
imports: from bigdl.orca import OrcaContext
  from bigdl.dllib.nncontext import init_nncontext
label_desc: Use image node_id 5 for calling the elastic_search obj's underlying member method code with example usage: obj.write_df(esConfig, esResource, df) without return types