Hi, can anyone help me
I am facing a following.
Summary
Can not create a document has mutlipolygon having hole.
I do not know why responses reason is correct or this is bug?
I have visualize the multipolygon, using geojson.
But , It seems correct polygon, I mean hole is within polygon.
Another document has polygon having hole is successfuly created.
So I guess specific polygon data can not be created.
Expected behavior
The document is successfuly created.
Actual behavior
Can not create a document.
The reponse is status 400.
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse field [location] of type [geo_shape]"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse field [location] of type [geo_shape]",
"caused_by": {
"type": "invalid_shape_exception",
"reason": "Invalid shape: Hole is not within polygon"
}
},
"status": 400
}
Steps to reproduce the problem
Using kibana devtool, put following requests.
DELETE geo
POST geo/_doc
{}
PUT geo/_mapping
{
"properties": {
"location": {
"type": "geo_shape"
}
}
}
POST /geo/_doc
{
"location": {
"type": "multipolygon",
"coordinates": [
[
[
[
136.213733593,
35.786550021
],
[
136.213891619,
35.786492823
],
[
136.214369639,
35.786314141
],
[
136.214423308,
35.786327978
],
[
136.214762481,
35.787228399
],
[
136.214867863,
35.78749709
],
[
136.214150004,
35.787679904
],
[
136.213733593,
35.786550021
]
],
[
[
136.213703006,
35.786561093
],
[
136.212561159,
35.788209032
],
[
136.214047375,
35.787822628
],
[
136.215960152,
35.787316346
],
[
136.215922928,
35.78721168
],
[
136.215682347,
35.787289767
],
[
136.214932678,
35.787475211
],
[
136.214644095,
35.786154679
],
[
136.2133956,
35.78660853
],
[
136.213703006,
35.786561093
]
]
]
]
}
}
Environment
ES 7.1.1