title: How to read from multiple Elasticsearch indices in Spark?
body: <p>I need to read data from multiple indices of Elasticsearch. But all of these indices have the same data structure.</p>
  
  <p>For example:</p>
  
  <pre><code>val df1 = spark.read.format("org.elasticsearch.spark.sql")
                .option("query", myquery)
                .option("pushdown", "true")
                .load("news_01/myitem")
  
  val df2 = spark.read.format("org.elasticsearch.spark.sql")
                .option("query", myquery)
                .option("pushdown", "true")
                .load("news_02/myitem")
  </code></pre>
  
  <p>What happens if I get the array of index names <code>["news_01", "news_02"]</code>?</p>
  
  <p>How can I avoid creating <code>df1</code>, <code>df2</code> as I do now?</p>