Can we read data from index into spark by query?

Hi

I want to read from ElasticSearch into Spark by python. There are some example from doc

df = sqlContext.read.format("org.elasticsearch.spark.sql").load("index/type")

But in this way, the whole index is read. Is it possible do this by query?

:wink:

Of course. In fact, if you read the docs, you'll find several references to it, including in the dedicated configuration chapter.

Thanks very much. I found those information on doc. Thanks again