# Elastic search 7.8.0 and multiple geoshapes

**URL:** https://discuss.elastic.co/t/elastic-search-7-8-0-and-multiple-geoshapes/239350
**Category:** Elasticsearch
**Created:** [June 30, 2020, 5:09pm UTC](https://discuss.elastic.co/t/elastic-search-7-8-0-and-multiple-geoshapes/239350 "2020-06-30T17:09:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pandzel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pandzel/32/71402_2.png) [@pandzel](https://discuss.elastic.co/u/pandzel)
#### Post date: [June 30, 2020, 5:09pm UTC](https://discuss.elastic.co/t/elastic-search-7-8-0-and-multiple-geoshapes/239350/1 "2020-06-30T17:09:11Z")

</div>

Hi,

I have created an index and I put the following mapping:

```auto
 {
    "dynamic_templates": [
        {
            "_geo": {
                "match": "*_geo",
                "mapping": {
                    "type": "geo_shape"
                }
            }
        }
    ]
}

```

then I am attempting to put a document:

```auto
{
    "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:

```auto
{
    "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?

---

<div class="post-metadata">

### Author: ![talevy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/talevy/32/44896_2.png) [@talevy](https://discuss.elastic.co/u/talevy)
#### Post date: [June 30, 2020, 9:22pm UTC](https://discuss.elastic.co/t/elastic-search-7-8-0-and-multiple-geoshapes/239350/2 "2020-06-30T21:22:08Z")

</div>

Hi @pandzel,

thank you so much for reporting this finding!

It is not intended, as you assumed. This was an untended bug  
due to some internal refactoring.

I've opened a PR to resolve this ASAP [https://github.com/elastic/elasticsearch/pull/58786](https://github.com/elastic/elasticsearch/pull/58786)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 28, 2020, 9:22pm UTC](https://discuss.elastic.co/t/elastic-search-7-8-0-and-multiple-geoshapes/239350/3 "2020-07-28T21:22:09Z")

</div>

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