How to create a RDD from ElasticSearch using DSL

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?

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