spark setup over elasticsearch for searching code example
Example 1: read from elasticsearch in spark
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.elasticsearch.spark._
...
val conf = ...
val sc = new SparkContext(conf)
val RDD = sc.esRDD("radio/artists")
Example 2: read from elasticsearch in spark
...
import org.elasticsearch.spark._
...
val conf = ...
val sc = new SparkContext(conf)
sc.esRDD("radio/artists", "?q=me*")