# Bug? Geo\_shape query not working for points\_only geo\_shape field in ES6.2.1

**URL:** <https://discuss.elastic.co/t/bug-geo-shape-query-not-working-for-points-only-geo-shape-field-in-es6-2-1/120009>\
**Category:** Elasticsearch\
**Created:** [February 15, 2018, 2:39pm UTC](https://discuss.elastic.co/t/bug-geo-shape-query-not-working-for-points-only-geo-shape-field-in-es6-2-1/120009 "2018-02-15T14:39:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oystein.elvik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oystein.elvik/32/27782_2.png) [@oystein.elvik](https://discuss.elastic.co/u/oystein.elvik)\
**Post date:** [February 15, 2018, 2:39pm UTC](https://discuss.elastic.co/t/bug-geo-shape-query-not-working-for-points-only-geo-shape-field-in-es6-2-1/120009/1 "2018-02-15T14:39:59Z")

</div>

To reproduce:

```
DELETE /example

PUT /example
{
    "mappings": {
        "_doc": {
            "properties": {
                "location": {
                    "type": "geo_shape",
                    "points_only": true
                }
            }
        }
    }
}

POST /example/_doc?refresh
{
    "name": "Wind & Wetter, Berlin, Germany",
    "location": {
        "type": "point",
        "coordinates": [13.400544, 52.530286]
    }
}

GET /example/_search
{
    "query":{
        "bool": {
            "must": {
                "match_all": {}
            },
            "filter": {
                "geo_shape": {
                    "location": {
                        "shape": {
                            "type": "envelope",
                            "coordinates" : [[13.0, 53.0], [14.0, 52.0]]
                        },
                        "relation": "within"
                    }
                }
            }
        }
    }
}

```

Result in no hits when we should expect 1 hit

---

<div class="post-metadata">

**Author:** ![oystein.elvik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oystein.elvik/32/27782_2.png) [@oystein.elvik](https://discuss.elastic.co/u/oystein.elvik)\
**Post date:** [February 22, 2018, 11:14pm UTC](https://discuss.elastic.co/t/bug-geo-shape-query-not-working-for-points-only-geo-shape-field-in-es6-2-1/120009/2 "2018-02-22T23:14:04Z")

</div>

Is this a Bug?

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [February 22, 2018, 11:22pm UTC](https://discuss.elastic.co/t/bug-geo-shape-query-not-working-for-points-only-geo-shape-field-in-es6-2-1/120009/3 "2018-02-22T23:22:29Z")

</div>

You may be running into the same as [https://github.com/elastic/elasticsearch/issues/28744](https://github.com/elastic/elasticsearch/issues/28744) which has a PR to fix it ([https://github.com/elastic/elasticsearch/pull/28774](https://github.com/elastic/elasticsearch/pull/28774)). Can you confirm that this used to work before 6.1 for you?

---

<div class="post-metadata">

**Author:** ![oystein.elvik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oystein.elvik/32/27782_2.png) [@oystein.elvik](https://discuss.elastic.co/u/oystein.elvik)\
**Post date:** [February 27, 2018, 8:07am UTC](https://discuss.elastic.co/t/bug-geo-shape-query-not-working-for-points-only-geo-shape-field-in-es6-2-1/120009/4 "2018-02-27T08:07:06Z")

</div>

Yes, this looks like the same issue

---

<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 27, 2018, 8:07am UTC](https://discuss.elastic.co/t/bug-geo-shape-query-not-working-for-points-only-geo-shape-field-in-es6-2-1/120009/5 "2018-03-27T08:07:36Z")

</div>

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