Failed to parse field [location] of type [geo_shape]

Hi,

I have a single geojson file that Elastic refuses to ingest. The file opens fine in QGIS and online viewers and also is accepted by Geoserver when exported as a shapefile.

If I convert the polygons to lines then I can ingest it into Elastic but for whatever reason it does not work with the file as a multipolygon.

I cannot upload the actual file as it contains data that is not allowed to be shared but looking at the file it looks the same as the other multipolygon geojson I ingested without problems.

Error:

{
"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": "class_cast_exception",
"reason": "class org.elasticsearch.geo.geometry.MultiPolygon cannot be cast to class org.elasticsearch.geo.geometry.Polygon (org.elasticsearch.geo.geometry.MultiPolygon and org.elasticsearch.geo.geometry.Polygon are in unnamed module of loader 'app')"
}
},
"status": 400
}

Could you add which version of Elasticsearch you are using?

I'm using 7.2.

Hi,

I cannot reproduce it, could you share the stack-trace that you find in the logs. That will tell me where the error is happening.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.