How to create a RDD from ElasticSearch using DSL


#1

I can create a RDD from ElasticSearch using query string as follow

val sc: SparkContext = getSparkContext()
val rdd = sc.esRDD("myindex/mytype", "?q=myterm")

How can I use ElasticSearch DSL syntax to specify the query?


(Piyush Goyal) #2

Check out the example in following link:
https://www.elastic.co/guide/en/elasticsearch/hadoop/current/configuration.html#_querying


(system) #3