# Geo\_shape query no longer working in 6.6.0

**URL:** <https://discuss.elastic.co/t/geo-shape-query-no-longer-working-in-6-6-0/167682>\
**Category:** Elasticsearch\
**Created:** [February 8, 2019, 7:46pm UTC](https://discuss.elastic.co/t/geo-shape-query-no-longer-working-in-6-6-0/167682 "2019-02-08T19:46:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankshad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankshad/32/11031_2.png) [@frankshad](https://discuss.elastic.co/u/frankshad)\
**Post date:** [February 8, 2019, 7:46pm UTC](https://discuss.elastic.co/t/geo-shape-query-no-longer-working-in-6-6-0/167682/1 "2019-02-08T19:46:49Z")

</div>

I tried upgrading my development system from 6.4 to 6.6.0. After this, point (in a document) in polygon (geo\_shape in the query) queries ("give me everyone located in this area") no longer work - no error or anything, just they produce no hits.

When I dumped and reloaded the data (so re-indexed), then it seems to be OK. But I would prefer not to have to take the live system down to re-index.

Though I see a note about geo\_shape in the 6.6 breaking changes, I don't see anything that I read as affecting this.

Specifically my query is scrolled, and the query is as below (for example). "address" is nested, and "address.location" is mapped as just {"type": "geo\_shape"} but it always contains just a single point.

```
{
  "size": 250,
  "version": true,
  "sort": [
    "membershipnumber"
  ],
  "_source": [
    "membershipnumber"
  ],
  "query": {
    "bool": {
      "should": [
        {
          "term": {
            "type": "current"
          }
        },
        {
          "nested": {
            "query": {
              "geo_shape": {
                "address.location": {
                  "shape": {
                    "coordinates": [
                      [
                        [
                          -2.559814453125,
                          51.461708066319
                        ],
                        [
                          -2.5048828125,
                          51.463419257923
                        ],
                        [
                          -2.5076293945312,
                          51.43860069927
                        ],
                        [
                          -2.5584411621094,
                          51.43774464626
                        ],
                        [
                          -2.559814453125,
                          51.461708066319
                        ]
                      ]
                    ],
                    "type": "polygon"
                  },
                  "relation": "within"
                }
              }
            },
            "path": "address"
          }
        }
      ],
      "minimum_should_match": 2
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [February 11, 2019, 10:07am UTC](https://discuss.elastic.co/t/geo-shape-query-no-longer-working-in-6-6-0/167682/2 "2019-02-11T10:07:02Z")

</div>

This is a known issue in 6.6.0:

> <https://github.com/elastic/elasticsearch/issues/38494>

We hope to have it fixed in the next bug fix release.

---

<div class="post-metadata">

**Author:** ![frankshad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankshad/32/11031_2.png) [@frankshad](https://discuss.elastic.co/u/frankshad)\
**Post date:** [February 11, 2019, 5:56pm UTC](https://discuss.elastic.co/t/geo-shape-query-no-longer-working-in-6-6-0/167682/3 "2019-02-11T17:56:26Z")

</div>

OK, thanks. I hold off upgrading until it is fixed then. I've no urgent need to upgrade, just keeping up to date.

---

<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:** [March 11, 2019, 5:56pm UTC](https://discuss.elastic.co/t/geo-shape-query-no-longer-working-in-6-6-0/167682/4 "2019-03-11T17:56:34Z")

</div>

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