From 042e97fa28cbf3a7dade770d501a86331ebd9747 Mon Sep 17 00:00:00 2001
From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io>
Date: Thu, 9 Jul 2015 16:33:08 +0300
Subject: [PATCH] Add geo bounds aggregation doc.

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

diff --git a/docs/Aggregation/GeoBounds.md b/docs/Aggregation/GeoBounds.md
new file mode 100644
index 0000000..0e75e10
--- /dev/null
+++ b/docs/Aggregation/GeoBounds.md
@@ -0,0 +1,33 @@
+# Geo Bounds Aggregation
+
+> More info about geo bounds aggregation is in the [official elasticsearch docs][1]
+
+A metric aggregation that computes the bounding box containing all geo_point values for a field.
+
+## Simple example
+
+```JSON
+{
+    "aggregations" : {
+        "agg_viewport" : {
+            "geo_bounds" : {
+                "field" : "location",
+                "wrap_longitude" : true
+            }
+        }
+    }
+}
+```
+
+And now the query via DSL:
+
+```php
+$geoBoundsAggregation = new GeoBoundsAggregation('viewport', 'location');
+
+$search = new Search();
+$search->addAggregation($geoBoundsAggregation);
+
+$queryArray = $search->toArray();
+```
+
+[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-geobounds-aggregation.html
-- 
GitLab