# Geo-bounding box query does not support \`topLeft\` & \`bottomLeft\`

**URL:** <https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792>\
**Category:** Elasticsearch\
**Created:** [May 24, 2021, 8:24am UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792 "2021-05-24T08:24:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pyppe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pyppe/32/3531_2.png) [@Pyppe](https://discuss.elastic.co/u/Pyppe)\
**Post date:** [May 24, 2021, 8:24am UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792/1 "2021-05-24T08:24:47Z")

</div>

The [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-bounding-box-query.html#_vertices) states that:

> More over the names `topLeft` , `bottomRight` , `topRight` and `bottomLeft` are supported

However, using `topLeft` & `bottomRight` causes an error:

```json
{
  "error": {
    "root_cause": [
      {
        "type": "parse_exception",
        "reason": "failed to parse [geo_bounding_box] query. [failed to parse bounding box. unexpected field [topLeft]]"
      }
    ],
    "type": "x_content_parse_exception",
    "reason": "[48:19] [bool] failed to parse field [filter]",
    "caused_by": {
      "type": "parse_exception",
      "reason": "failed to parse [geo_bounding_box] query. [failed to parse bounding box. unexpected field [topLeft]]"
    }
  },
  "status": 400
}

```

I would have filed an issue, but [Sign in to GitHub · GitHub](https://github.com/elastic/elasticsearch/issues/new/choose) GitHub mentions this forum for unconfirmed bugs.

---

<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:** [May 24, 2021, 4:04pm UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792/2 "2021-05-24T16:04:32Z")

</div>

Could you provide 1) Elasticsearch version 2) the exact query that is generating the error you posted above?

---

<div class="post-metadata">

**Author:** ![Pyppe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pyppe/32/3531_2.png) [@Pyppe](https://discuss.elastic.co/u/Pyppe)\
**Post date:** [May 26, 2021, 6:12am UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792/3 "2021-05-26T06:12:31Z")

</div>

### Version

`7.12.1`

### Example query

```json
{
  "size": 1,
  "query": {
    "geo_bounding_box": {
      "coordinates": {
        "topLeft": {
          "lat": 75.76654624435699,
          "lon": -168.25100089690216
        },
        "bottomRight": {
          "lat": -34.773502906183325,
          "lon": 179
        }
      }
    }
  }
}

```

---

<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:** [May 26, 2021, 6:26am UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792/4 "2021-05-26T06:26:06Z")

</div>

You are using camel case instead of separating the words using underscore:

```auto
{
  "size": 1,
  "query": {
    "geo_bounding_box": {
      "coordinates": {
        "top_left": {
          "lat": 75.76654624435699,
          "lon": -168.25100089690216
        },
        "bottom_right": {
          "lat": -34.773502906183325,
          "lon": 179
        }
      }
    }
  }
}

```

---

<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:** [May 26, 2021, 6:29am UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792/5 "2021-05-26T06:29:17Z")

</div>

I see, I think the docs are not correct, would you mind open an issue? I think we should address this.

---

<div class="post-metadata">

**Author:** ![Pyppe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pyppe/32/3531_2.png) [@Pyppe](https://discuss.elastic.co/u/Pyppe)\
**Post date:** [May 26, 2021, 6:32am UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792/6 "2021-05-26T06:32:49Z")

</div>

> You are using camel case instead of separating the words using underscore

I know. That's what I said in my first message. 🙂

---

<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:** [May 26, 2021, 6:34am UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792/7 "2021-05-26T06:34:45Z")

</div>

I know, my bad, I have corrected myself and agreed with you that docs should be corrected 🙂

Thank you!

---

<div class="post-metadata">

**Author:** ![Pyppe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pyppe/32/3531_2.png) [@Pyppe](https://discuss.elastic.co/u/Pyppe)\
**Post date:** [May 26, 2021, 11:36am UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792/8 "2021-05-26T11:36:55Z")

</div>

Thanks for your help! I'll create the issue in GitHub. Although, I wouldn't mind if actually the implementation would be changed to match the docs:

> More over the names `topLeft` , `bottomRight` , `topRight` and `bottomLeft` are supported

😊

---

<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:** [June 23, 2021, 11:37am UTC](https://discuss.elastic.co/t/geo-bounding-box-query-does-not-support-topleft-bottomleft/273792/9 "2021-06-23T11:37:43Z")

</div>

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