Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggs: geo_bounds don't like when the lat or lon is equal to 0 #11085

Closed
jpountz opened this issue May 11, 2015 · 0 comments · Fixed by #11090
Closed

Aggs: geo_bounds don't like when the lat or lon is equal to 0 #11085

jpountz opened this issue May 11, 2015 · 0 comments · Fixed by #11090
Assignees
Labels

Comments

@jpountz
Copy link
Contributor

jpountz commented May 11, 2015

Here is a reproduction:

DELETE test 

PUT test 
{
  "mappings": {
    "test": {
      "properties": {
        "loc": {
          "type": "geo_point"
        }
      }
    }
  }
}

PUT test/test/1
{
  "loc": "1,0"
}

GET test/_search
{
  "aggs": {
    "loc_bounds": {
      "geo_bounds": {
        "field": "loc"
      }
    }
  }
}

which returns

{
   "took": 2,
   "timed_out": false,
   "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
   },
   "hits": {
      "total": 1,
      "max_score": 1,
      "hits": [
         {
            "_index": "test",
            "_type": "test",
            "_id": "1",
            "_score": 1,
            "_source": {
               "loc": "1,0"
            }
         }
      ]
   },
   "aggregations": {
      "loc_bounds": {
         "bounds": {
            "top_left": {
               "lat": 1,
               "lon": "Infinity"
            },
            "bottom_right": {
               "lat": 1,
               "lon": "-Infinity"
            }
         }
      }
   }
}
@jpountz jpountz added the >bug label May 11, 2015
colings86 added a commit that referenced this issue May 11, 2015
When the longitude is zero for a document, the left and right bounds do not get updated in the geo bounds aggregation which can cause the bounds to be returned with Infinite values for longitude

Closes #11085
colings86 added a commit that referenced this issue May 11, 2015
When the longitude is zero for a document, the left and right bounds do not get updated in the geo bounds aggregation which can cause the bounds to be returned with Infinite values for longitude

Closes #11085
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants