<commit_before>Elasticsearch Aggregation Geoclustering Plugin
================================================


The geoclustering aggregation plugin adds the possibility to aggregate Geo Points in geographical clusters.

This is a bucket aggregation.

|   Geoclustering aggregation Plugin  | elasticsearch     | Release date |
|-------------------------------------|-------------------|:------------:|
| 1.2.0                               | 1.4.0 -> master   |  2014-11-27  |
| 1.1.0                               | 1.3.0             |  2014-07-25  |
| 1.0.1                               | 1.2.2             |  2014-07-18  |

Overview
--------

This plugin computes a geohash precision from a `zoom` and a `distance` (in pixel).
It groups points (from `field` parameter) into buckets that represent geohash cells and computes each buckets center.
Then it merges these cells if distance between two cluster centers is lower than `distance` parameter.

Usage
-----

```json
{
  "aggregations": {
    "<aggregation_name>": {
      "geohash_clustering": {
        "field": "<field_name>",
        "zoom": "<zoom>"
      }
    }
  }
}
```

`field` must be of type geo_point.
`zoom` is a mandatory integer parameter between 0 and 20. It represents the zoom level used in the request to aggregate geo points.
The plugin aggregates these points in geohash with a "good" precision depending on the zoom provided. Then it merges clusters based on distance (in pixels).
Default distance is set to 100, but can be set to another integer in the request.

For example :

```json
{
    "aggregations" : {
        "my_cluster_aggregation" : {
            "geohash_clustering": {
                "field": "geo_point",
                "zoom": 0,
                "distance": 50
            }
        }
    }
}
```

```json
{
    "aggregations": {
         "my_cluster_aggregation": {
            "buckets": [
               {
                  "key": "u0",
                  "doc_count": 90293,
                  "geohash_grids": [
                     [
                        "u0"
                     ]
                  ],
                  "cluster_center": {
                     "type": "point",
                     "coordinates": [
                        2.32920361762,
                        48.8449899502
                     ]
                  }
               }
            ]
         }
    }

}
```

Installation
------------

`bin/plugin --install geo_clustering_aggregation --url "https://github.com/opendatasoft/elasticsearch-aggregation-geoclustering/releases/download/v1.2.0/elasticsearch-geoclustering-aggregation-1.2.0.zip"`


License
-------<commit_msg>Update doc for elasticsearch 1.4.1<commit_after>Elasticsearch Aggregation Geoclustering Plugin
================================================


The geoclustering aggregation plugin adds the possibility to aggregate Geo Points in geographical clusters.

This is a bucket aggregation.

|   Geoclustering aggregation Plugin  | elasticsearch     | Release date |
|-------------------------------------|-------------------|:------------:|
| 1.2.1                               | 1.4.1 -> master   |  2014-11-28  |
| 1.2.0                               | 1.4.0             |  2014-11-27  |
| 1.1.0                               | 1.3.0             |  2014-07-25  |
| 1.0.1                               | 1.2.2             |  2014-07-18  |

Overview
--------

This plugin computes a geohash precision from a `zoom` and a `distance` (in pixel).
It groups points (from `field` parameter) into buckets that represent geohash cells and computes each buckets center.
Then it merges these cells if distance between two cluster centers is lower than `distance` parameter.

Usage
-----

```json
{
  "aggregations": {
    "<aggregation_name>": {
      "geohash_clustering": {
        "field": "<field_name>",
        "zoom": "<zoom>"
      }
    }
  }
}
```

`field` must be of type geo_point.
`zoom` is a mandatory integer parameter between 0 and 20. It represents the zoom level used in the request to aggregate geo points.
The plugin aggregates these points in geohash with a "good" precision depending on the zoom provided. Then it merges clusters based on distance (in pixels).
Default distance is set to 100, but can be set to another integer in the request.

For example :

```json
{
    "aggregations" : {
        "my_cluster_aggregation" : {
            "geohash_clustering": {
                "field": "geo_point",
                "zoom": 0,
                "distance": 50
            }
        }
    }
}
```

```json
{
    "aggregations": {
         "my_cluster_aggregation": {
            "buckets": [
               {
                  "key": "u0",
                  "doc_count": 90293,
                  "geohash_grids": [
                     [
                        "u0"
                     ]
                  ],
                  "cluster_center": {
                     "type": "point",
                     "coordinates": [
                        2.32920361762,
                        48.8449899502
                     ]
                  }
               }
            ]
         }
    }

}
```

Installation
------------

`bin/plugin --install geo_clustering_aggregation --url "https://github.com/opendatasoft/elasticsearch-aggregation-geoclustering/releases/download/v1.2.1/elasticsearch-geoclustering-aggregation-1.2.1.zip"`


License
-------
{'fraction_non_alphanumeric': 0.14791589819254888, 'fraction_numerical': 0.03559572113611213, 'mean_word_length': 1.4694899817850637, 'pattern_counts': {'":': 36, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3412660', 'n_tokens_mistral': 1637, 'n_tokens_neox': 1412, 'n_words': 409}