Hi,
I have this processor:
[
{
"foreach": {
"field": "location",
"processor": {
"set": {
"field": "geo.lat",
"value": "{{_ingest._value.lat}}"
}
}
}
},
{
"foreach": {
"field": "location",
"processor": {
"set": {
"field": "geo.lon",
"value": "{{_ingest._value.lon}}"
}
}
}
}
]
that should select a location field and split in two geo fields.
When I create the pipeline and test it I have this error:
[illegal_argument_exception] field [location] of type [java.util.HashMap] cannot be cast to [java.util.List]
The original document is:
{
"_index": "device_data",
"_type": "_doc",
"_id": "3VX4onkBuzazNoZiQQmg",
"_version": 1,
"_score": 0,
"fields": {
"date": [
"2021-05-25T12:00:49.000Z"
],
"temp": [
27.8
],
"ver": [
"0.15"
],
"memFree": [
49
],
"busErr": [
0
],
"diskFree": [
88
],
"uptime": [
1890480
],
"location": [
{
"accuracy": [
20
],
"lon": [
9.299167
],
"lat": [
45.516632
]
}
],
"id": [
"NZOO-SNI-1-1"
],
"ittver": [
""
],
"avgLoad": [
2.18
],
"customer": [
""
]
}
}