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

Geohash is not indexed unless the precision is 12 #12467

Closed
clintongormley opened this issue Jul 26, 2015 · 2 comments
Closed

Geohash is not indexed unless the precision is 12 #12467

clintongormley opened this issue Jul 26, 2015 · 2 comments
Assignees
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug v2.0.0-rc1

Comments

@clintongormley
Copy link

If the geohash_precision is set to anything except the default (12), and geohash_prefix is not true, the geohash is not indexed:

PUT my_index
{
  "mappings": {
    "my_type": {
      "properties": {
        "location": {
          "type": "geo_point",
          "geohash": true,
          "geohash_precision": 11
        }
      }
    }
  }
}


PUT my_index/my_type/1
{
  "location": {
    "lat": 41.12,
    "lon": -71.34
  }
}

GET my_index/_search?fielddata_fields=location.geohash
@clintongormley clintongormley added >bug :Analytics/Geo Indexing, search aggregations of geo points and shapes labels Jul 26, 2015
@nknize
Copy link
Contributor

nknize commented Sep 17, 2015

This is a silly mappings refactor mistake... the bigger issue is that we didn't have a test for catching this. I'll backport and make sure there's sufficient test coverage.

@nknize
Copy link
Contributor

nknize commented Sep 23, 2015

Merged #13649

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug v2.0.0-rc1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants