geo_bounds aggregation fails to generate geo_bounds for SOME countries (large countries?) in my dataset, how can I fix this>?
My example query against a country "New Zealand"
GET countries/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"search_name.exact": {
"query": "New Zealand",
"operator": "and",
"fuzziness": 0
}
}
}
]
}
},
"aggs": {
"viewport": {
"geo_bounds": {
"field": "geometry",
"wrap_longitude": true
}
}
}
}
The results:
{
"took" : 21,
"timed_out" : false,
"_shards" : {
"total" : 14,
"successful" : 14,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 1,
"relation" : "eq"
},
"max_score" : 5.1119876,
"hits" : [
{
"_index" : "countries",
"_type" : "_doc",
"_id" : "dlCgf4IBGlxVHLiS8Lvb",
"_score" : 5.1119876,
"_ignored" : [
"geometry"
],
"_source" : {
"id" : 134,
"search_name" : "New Zealand",
"iso_cc" : "NU",
"continent" : "Oceania",
"countryaff" : "New Zealand",
"extent_area" : 1.89656638688E14,
"vertex_count" : 34531.0,
"geometry" : {
"type" : "MultiPolygon",
"coordinates" : [............]
},
"aggregations" : {
"viewport" : { }
}
}
As you can see the "viewport" is empty, and this happens for MOST countries in my dataset, even though they render correctly