From 05c1fbc0397a8279772f406abcdf4acb6be63ba6 Mon Sep 17 00:00:00 2001
From: Aivaras Gotovskis <aivaras.gotovskis@ongr.io>
Date: Thu, 9 Jul 2015 15:58:05 +0300
Subject: [PATCH] Add constructor arguments to GeoHashGridAggregation.

---
 src/Aggregation/GeoHashGridAggregation.php | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/Aggregation/GeoHashGridAggregation.php b/src/Aggregation/GeoHashGridAggregation.php
index f85144e..875333d 100644
--- a/src/Aggregation/GeoHashGridAggregation.php
+++ b/src/Aggregation/GeoHashGridAggregation.php
@@ -35,6 +35,25 @@ class GeoHashGridAggregation extends AbstractAggregation
      */
     private $shardSize;
 
+    /**
+     * Inner aggregations container init.
+     *
+     * @param string $name
+     * @param string $field
+     * @param int    $precision
+     * @param int    $size
+     * @param int    $shardSize
+     */
+    public function __construct($name, $field = null, $precision = null, $size = null, $shardSize = null)
+    {
+        parent::__construct($name);
+
+        $this->setField($field);
+        $this->setPrecision($precision);
+        $this->setSize($size);
+        $this->setShardSize($shardSize);
+    }
+
     /**
      * @return int
      */
-- 
GitLab