title: How to create an index in ElasticSearch and push data from streaming query?
body: <p>Not able to create an index and push the data to elasticsearch using elastic sink</p>
  
  <pre><code>df.writeStream
    .outputMode("append")
    .format("org.elasticsearch.spark.sql")
    .option("es.nodes","localhost:9200")
    .option("checkpointLocation","/tmp/")
    .option("es.resource","index/type")
    .start
  </code></pre>
  
  <p>There are no errors, unfortunately it is not working.</p>
  
  <p>at times(1 out of 10) above snippet creates new index but it doesn't push data of the dataframe/dataset to index created. Remaining times it doesn't even create a index. It seems something with properties of elastic search configurations.</p>