From 62ba809c27045ffc4002225c3c4c5dc0f6d57476 Mon Sep 17 00:00:00 2001
From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io>
Date: Thu, 9 Jul 2015 16:51:48 +0300
Subject: [PATCH] Add geo hash grid aggregation doc.

---
 docs/Aggregation/GeoHashGrid.md | 38 +++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 docs/Aggregation/GeoHashGrid.md

diff --git a/docs/Aggregation/GeoHashGrid.md b/docs/Aggregation/GeoHashGrid.md
new file mode 100644
index 0000000..e372264
--- /dev/null
+++ b/docs/Aggregation/GeoHashGrid.md
@@ -0,0 +1,38 @@
+# Geo Hash Grid Aggregation
+
+> More info about geo hash grid aggregation is in the [official elasticsearch docs][1]
+
+A multi-bucket aggregation that works on geo_point fields and groups points into buckets
+that represent cells in a grid.
+
+## Simple example
+
+```JSON
+{
+    "aggregations" : {
+        "agg_GrainGeoHashGrid" : {
+            "geohash_grid" : {
+                "field" : "location",
+                "precision" : 3
+            }
+        }
+    }
+}
+```
+
+And now the query via DSL:
+
+```php
+$geoHashGridAggregation = new GeoHashGridAggregation(
+    'GrainGeoHashGrid',
+    'location',
+    3
+);
+
+$search = new Search();
+$search->addAggregation($geoHashGridAggregation);
+
+$queryArray = $search->toArray();
+```
+
+[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html
-- 
GitLab