A tricky bug (or I miss a setting maybe ..), with ES 2.4.4 and ES4Hadoop 2.4.4, let's create an index:
PUT /toto/events/1
{
"toto": 1,
"data": [],
"name": "webapp_loaded"
}
This will generate the mapping:
{
"toto" : {
"mappings" : {
"events" : {
"properties" : {
"name" : {
"type" : "string"
},
"toto" : {
"type" : "long"
}
}
}
}
}
}
Note: field data has no mapping, because it's an empty array I guess. Now, let's query this with Spark:
scala> sc.esRDD("toto").first.toString
res22: String = (1,Map(toto -> 1))
Where is the name and data fields? It looks like the parser "ignore" fields after data.
It seems fixed with es4Hadoop 5.0.0
