elasticsearch/elasticsearch-hadoop — pull request #335 by jeffsteinmetz (2014-11-29 00:46:16+00:00)
Title: Adds a utility to walk Map[String,Any] as discussed at issues/251

https://github.com/elasticsearch/elasticsearch-hadoop/issues/251

implicits available when you import:
import org.elasticsearch.spark.rdd.EsRDDUtils._

usage examples:

val a:Double = (v._2 \ "double_test").asOptDouble.getOrElse(0.0)
val b:Long = (v._2 \ "long_test").asOptLong.getOrElse(0)
val c:String = (v._2 \ "nested.string_test").asOptString.getOrElse("")
val d:Option[String] = (v._2 \ "invalid.location").asOptString