From 0c65a81f6ec999b42b4665b8075cd947c2fa0d03 Mon Sep 17 00:00:00 2001
From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io>
Date: Fri, 10 Jul 2015 12:05:25 +0300
Subject: [PATCH] Add max aggregation doc.

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

diff --git a/docs/Aggregation/Max.md b/docs/Aggregation/Max.md
new file mode 100644
index 0000000..fff8bd3
--- /dev/null
+++ b/docs/Aggregation/Max.md
@@ -0,0 +1,29 @@
+# Max Aggregation
+
+> More info about max aggregation is in the [official elasticsearch docs][1]
+
+A single-value metrics aggregation that keeps track and returns the
+maximum value among the numeric values extracted from the aggregated documents.
+
+## Simple example
+
+```JSON
+{
+    "aggregations" : {
+        "max_price" : { "max" : { "field" : "price" } }
+    }
+}
+```
+
+And now the query via DSL:
+
+```php
+$maxAggregation = new MaxAggregation('max_price', 'price');
+
+$search = new Search();
+$search->addAggregation($maxAggregation);
+
+$queryArray = $search->toArray();
+```
+
+[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-max-aggregation.html
-- 
GitLab