Tech Topics

Elasticsearch 0.90.2 Released

The Elasticsearch dev team are pleased to announce the release of Elasticsearch 0.90.2, which is based on Lucene 4.3.1. You can download it here.

We recommend upgrading to 0.90.2 from 0.90.1, especially if you are using the terms-lookup filter, as this release includes some enhancements and bug fixes to terms lookup.

Besides the other enhancements and bug-fixes, which you can read about on the issues list, there is one new feature that is particularly worth mentioning: improved support for geohashes on geopoints:

A geohash is a string representing an area on earth – the longer the string the more precise the geohash. A geohash just one character long refers to an area with a very rough precision: +/- 2500 km. A geohash of length 8 would be accurate to within 20m, etc. Because a geohash is just a string, we can index it in Elasticsearch and take advantage of the inverted index to make blazingly fast geo-location queries.

Geohashes have been supported for a long time, but they are now easier to use. First, define the mapping for your geo-point field as follows:

{" location": {
    "type": "geopoint",
    "geohash_prefix": true

The `geohash_prefix` option tells Elasticsearch to index geo-hashes, and to index geo-hashes as “edge ngrams”. For instance, the geo-hash ezs42 would be indexed as the terms: e, ez, ezs, ezs4 and ezs42.

You can use the geohash_cell filter to filter by geo-hashes as follows:

curl localhost:9200/_search -d '
  "query": {
    "filtered": {
      "filter": {
        "geohash_cell": {
          "precision": "30km",
          "location": {
            "lat": 0,
            "lon": 50

Setting the precision parameter allows Elasticsearch to decide what length of geohash should be used for searching, which reduces the geo-query to a single term lookup, and single term lookups are very very fast!

Please download and use 0.90.2, and let us know what you think.

  • We're hiring

    Work for a global, distributed team where finding someone like you is just a Zoom meeting away. Flexible work with impact? Development opportunities from the start?