Hi,
I have created an index and I put the following mapping:
{
"dynamic_templates": [
{
"_geo": {
"match": "*_geo",
"mapping": {
"type": "geo_shape"
}
}
}
]
}
then I am attempting to put a document:
{
"envelope_geo": [
{
"type": "envelope",
"coordinates": [[100.0, 1.0], [101.0, 0.0]]
},
{
"type": "envelope",
"coordinates": [[100.0, 1.0], [101.0, 0.0]]
}
]
}
It fails with the message:
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "shape must be an object consisting of type and coordinates"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse field [envelope_geo] of type [geo_shape]",
"caused_by": {
"type": "parse_exception",
"reason": "shape must be an object consisting of type and coordinates"
}
},
"status": 400
}
This sequence described above used to work in previous versions. Now it only accepts a single geoshape (no square brackets), but rejects an array of geoshapes.
Is this expected or is it a bug?