I am trying to read datas from Elasticsearch, but the document I want to read contains a nested array (that I want to read).
I included the option "es.read.field.as.array.include" in the following way :
val dataframe = reader
.option("es.read.field.as.array.include","arrayField")
.option("es.query", "someQuery")
.load("Index/Document")
But got the error
java.lang.ClassCastException: scala.collection.convert.Wrappers$JListWrapper cannot be cast to java.lang.Float
How should I map my array to read it ?
Sample of data from ES :
{
"_index": "Index",
"_type": "Document",
"_id": "ID",
"_score": 1,
"_source": {
"currentTime": 1516211640000,
"someField": someValue,
"arrayField": [
{
"id": "000",
"field1": 14,
"field2": 20.23871387052084,
"innerArray": [[ 55.2754,25.1909],[ 55.2754,25.190929],[ 55.27,25.190]]
}, ...
],
"meanError": 0.3082,
}
}