We have field in one of our index with GeoJSON supported format of coordinates [ x, y , z] in number format. however when tried to created mapping with geo_shape format with flag "ignore_z_value" to true it still fails to index documents.
Tried other scripting and ingest pipeline methods, but nothing worked out.
I have source document
'''''''''
{
"_index": "test_index",
"_type": "_doc",
"_id": "5f8c01c03f9466001172495b",
"_version": 6964426729028846000,
"_score": 0,
"fields": {
"geometry.type.keyword": [
"Polygon"
],
"type": [
"Feature"
],
"geometry.coordinates": [
-122.475716,
37.80737,
0,
-122.47572,
37.80602,
0,
-122.47402,
37.80601,
0,
-122.474014,
37.80736,
0
],
}
}
''''''''''''
Goal is to get a document like this
'''''''''''
{
"_index": "test_index",
"_type": "_doc",
"_id": "5f8c01c03f9466001172495b",
"_version": 6964426729028846000,
"_score": 0,
"fields": {
"geometry.type.keyword": [
"Polygon"
],
"type": [
"Feature"
],
"geometry.coordinates": [
[
120.65400,
24.19446
],
[
-122.47572,
37.80602,
],
[
-122.47402,
37.80601,
],
[
-122.474014,
37.80736,
],
}
}
''''''''''''''''''
Appreciate any help to fix this