Hi everyone,
I am trying to index geoshapes from kafka messages ...
I just can not use the merge to put arrays in an array.
For instance, i want to index an envelope geoshape like this in target elasticsearch json:
[...]
"location" : {
"type":"envelope",
"coordinates": [ [x1,y1], [x2,y2] ]
},
[...]
I tryed this:
mutate { convert => { "x1" => float "x2" => float "y1" => float "y2" => float } merge => { "x1" => "y1"} merge => { "x2" => "y2" } merge => { "coordinates" => "x1" } merge => { "coordinates" => "x2" }
But as a result I found:
"coordinates": [x2,y2]
and not
"coordinates":[[x1,y1],[x2,y2]
Any idea on how to achieve this ?
I thought about the ruby code filter but I definitely do not master the syntax
Thanks for your help !