title: elasticsearch 7.3 geo-shape envelop invalid_shape_exception
body: <p>I have a field mapping as <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html" rel="nofollow noreferrer">geo-shape</a>. </p>
  
  <p>I want to give the coordinates of northwest and southeast and look up the area within it.</p>
  
  <p>I know there is an <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-query.html" rel="nofollow noreferrer">example</a>. so I copied this.</p>
  
  <pre><code>curl -X GET "localhost:9200/example/_search?pretty" -H 'Content-Type: application/json' -d'
  {
      "query":{
          "bool": {
              "must": {
                  "match_all": {}
              },
              "filter": {
                  "geo_shape": {
                      "location": {
                          "shape": {
                              "type": "envelope",
                              "coordinates" : [[13.0, 53.0], [14.0, 52.0]]
                          },
                          "relation": "within"
                      }
                  }
              }
          }
      }
  }
  '
  
  </code></pre>
  
  <p>here is my curl request.</p>
  
  <pre><code>curl -X GET "https://atlas-search.company.com/regions_19090403/_search?pretty" -H 'Content-Type: application/json' -d'
  {
      "query":{
          "bool": {
              "must": {
                  "match_all": {}
              },
              "filter": {
                  "geo_shape": {
                      "boundaries": {
                          "shape": {
                              "type": "envelope",
                              "coordinates" : [[37.54069137885601, 127.0164930082651], [37.472603386664225, 127.03280083907562]]
                          },
                          "relation": "within"
                      }
                  }
              }
          }
      }
  }
  '
  </code></pre>
  
  <p>but it returns </p>
  
  <pre><code>'
  {
    "error" : {
      "root_cause" : [
        {
          "type" : "invalid_shape_exception",
          "reason" : "invalid_shape_exception: Y values [127.03280083907562 to 127.0164930082651] not in boundary Rect(minX=-180.0,maxX=180.0,minY=-90.0,maxY=90.0)"
        }
      ],
      "type" : "search_phase_execution_exception",
      "reason" : "all shards failed",
      "phase" : "query",
      "grouped" : true,
      "failed_shards" : [
        {
          "shard" : 0,
          "index" : "regions_19090403",
          "node" : "4ySStuelRfuJrcg_BQvy_Q",
          "reason" : {
            "type" : "query_shard_exception",
            "reason" : "failed to create query: {\n  \"bool\" : {\n    \"must\" : [\n      {\n        \"match_all\" : {\n          \"boost\" : 1.0\n        }\n      }\n    ],\n    \"filter\" : [\n      {\n        \"geo_shape\" : {\n          \"boundaries\" : {\n            \"shape\" : {\n              \"type\" : \"envelope\",\n              \"coordinates\" : [\n                [\n                  37.54069137885601,\n                  127.0164930082651\n                ],\n                [\n                  37.472603386664225,\n                  127.03280083907562\n                ]\n              ]\n            },\n            \"relation\" : \"within\"\n          },\n          \"ignore_unmapped\" : false,\n          \"boost\" : 1.0\n        }\n      }\n    ],\n    \"adjust_pure_negative\" : true,\n    \"boost\" : 1.0\n  }\n}",
            "index_uuid" : "BFdVr06-TEaSLyaeETsxFQ",
            "index" : "regions_19090403",
            "caused_by" : {
              "type" : "invalid_shape_exception",
              "reason" : "invalid_shape_exception: Y values [127.03280083907562 to 127.0164930082651] not in boundary Rect(minX=-180.0,maxX=180.0,minY=-90.0,maxY=90.0)"
            }
          }
        }
      ],
      "caused_by" : {
        "type" : "invalid_shape_exception",
        "reason" : "invalid_shape_exception: Y values [127.03280083907562 to 127.0164930082651] not in boundary Rect(minX=-180.0,maxX=180.0,minY=-90.0,maxY=90.0)"
      }
    },
    "status" : 400
  }
  </code></pre>
  
  <p>and I cant find about this.
  I don't know anything, so I can't retrieve information about this situation. If you know what this situation is, please share your knowledge.</p>