{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/35523","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/35523/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/35523/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/35523/events","html_url":"https://github.com/elastic/elasticsearch/issues/35523","id":380473305,"node_id":"MDU6SXNzdWUzODA0NzMzMDU=","number":35523,"title":"geoHashLevelsForPrecision returns 24 maximum level on 0 meters passed","user":{"login":"chamini2","id":2745502,"node_id":"MDQ6VXNlcjI3NDU1MDI=","avatar_url":"https://avatars0.githubusercontent.com/u/2745502?v=4","gravatar_id":"","url":"https://api.github.com/users/chamini2","html_url":"https://github.com/chamini2","followers_url":"https://api.github.com/users/chamini2/followers","following_url":"https://api.github.com/users/chamini2/following{/other_user}","gists_url":"https://api.github.com/users/chamini2/gists{/gist_id}","starred_url":"https://api.github.com/users/chamini2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamini2/subscriptions","organizations_url":"https://api.github.com/users/chamini2/orgs","repos_url":"https://api.github.com/users/chamini2/repos","events_url":"https://api.github.com/users/chamini2/events{/privacy}","received_events_url":"https://api.github.com/users/chamini2/received_events","type":"User","site_admin":false},"labels":[{"id":141079527,"node_id":"MDU6TGFiZWwxNDEwNzk1Mjc=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Search/Geo","name":":Search/Geo","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-11-13T23:42:51Z","updated_at":"2018-11-14T16:07:08Z","closed_at":null,"author_association":"NONE","body":"I was using `geoHashLevelsForPrecision` and in \r\n\r\nhttps://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/common/geo/GeoUtils.java#L202-L204\r\n\r\nit seems to return the maximum possible level if you pass 0 meters. This is delegated to `GeohashPrefixTree`, which is returning `24`; instead of using `GeoHashUtils.PRECISION` (12).\r\n\r\nAm I not understanding the method or this is a bug?"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/438717543","html_url":"https://github.com/elastic/elasticsearch/issues/35523#issuecomment-438717543","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/35523","id":438717543,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODcxNzU0Mw==","user":{"login":"chamini2","id":2745502,"node_id":"MDQ6VXNlcjI3NDU1MDI=","avatar_url":"https://avatars0.githubusercontent.com/u/2745502?v=4","gravatar_id":"","url":"https://api.github.com/users/chamini2","html_url":"https://github.com/chamini2","followers_url":"https://api.github.com/users/chamini2/followers","following_url":"https://api.github.com/users/chamini2/following{/other_user}","gists_url":"https://api.github.com/users/chamini2/gists{/gist_id}","starred_url":"https://api.github.com/users/chamini2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamini2/subscriptions","organizations_url":"https://api.github.com/users/chamini2/orgs","repos_url":"https://api.github.com/users/chamini2/repos","events_url":"https://api.github.com/users/chamini2/events{/privacy}","received_events_url":"https://api.github.com/users/chamini2/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T16:07:08Z","updated_at":"2018-11-14T16:07:08Z","author_association":"NONE","body":"I want a method that works just like `geoHashLevelsForPrecision` but returns 12 or less (like https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html says), not 24 (which seems to be appropriate for geohash prefix tree)"}}
{"actor":{"display_login":"chamini2"}}