title: How to query an Elasticsearch index using Pyspark and Dataframes
body: <p>Elasticsaerch's documentation only covers loading a complete index to Spark.</p>
  
  <pre><code>from pyspark.sql import SQLContext
  sqlContext = SQLContext(sc)
  df = sqlContext.read.format("org.elasticsearch.spark.sql").load("index/type")
  df.printSchema()
  </code></pre>
  
  <p>How can you perform a query to return data from an Elasticsearch index and load them to Spark as a DataFrame using pyspark?</p>