Can we read data from index into spark by query?


(Kramer Li) #1

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?


(Kramer Li) #2

:wink:


(Costin Leau) #3

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


(Kramer Li) #4

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


(system) #5