class_docstr: Primary DataFrame-based loading data from elastic search interface,
  defining API to read data from ES to DataFrame.
code: def flatten(schema, prefix=None):
      from pyspark.sql.types import StructType
  
      fields = []
      for field in schema.fields:
          name = prefix + "." + field.name if prefix else field.name
          dtype = field.dataType
  
          if isinstance(dtype, StructType):
              fields += elastic_search.flatten(dtype, prefix=name)
          else:
              fields.append(name)
      return fields
  
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 4 for calling the elastic_search obj's underlying member method code with example usage: obj.flatten(schema, prefix) and returns: fields