I've a this mapping for indexing GeoJSON MultiPolygons:
{
"mappings": {
"my_type" : {
"properties" : {
"geometry": {
"type": "object",
"properties": {
"coordinates": {
"type": "geo_shape",
"tree": "quadtree",
"precision": "1m"
}
}
}
}
}
}
}
My GeoJSON documents look like this:
{"geometry":{"type":"MultiPolygon","coordinates":[[[[11.271196228214,55.247805547961],[11.271415191178,55.248005636951],[11.272013768321,55.248560723627],[11.272058551835,55.248598558283],[11.273631710783,55.248255507202],[11.274165502845,55.248139089356],[11.2751977725,55.248012026015],[11.276148189941,55.247962910469],[11.276033574199,55.24771532027],[11.2755629564,55.247586277758],[11.275591272403,55.247498363089],[11.275452482819,55.247483495962],[11.27510822465,55.247458465267],[11.274987174807,55.247442898274],[11.274824474983,55.247406085853],[11.274510209456,55.247328216944],[11.273941216581,55.247162791988],[11.273799227027,55.247120235045],[11.273718504568,55.247069399251],[11.2736681305,55.247012460896],[11.273591300644,55.246954289745],[11.27349739339,55.246807549207],[11.27344186075,55.246753115818],[11.271888315476,55.246928766054],[11.270522231629,55.24710369422],[11.270531915141,55.247114857522],[11.270465084795,55.247142572448],[11.27052135682,55.247178027612],[11.270671844775,55.247285794714],[11.271196228214,55.247805547961]]]]},"type":"Feature","properties":{"gid":2}}
And I get:
{"took":1,"errors":true,"items":[{"index":{"_index":"mydb_test","_type":"my_type","_id":"2","status":400,"error":"MapperParsingException[failed
to parse [geometry.coordinates]]; nested: ElasticsearchParseException[Shape
must be an object consisting of type and coordinates]; "}}]}
I guess the mapping is wrong?
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3c0b181c-361d-4dc9-90c7-8ef879fd7a65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.