From 466fd15fe2812bfe8fe907542b88a3a88fc70f10 Mon Sep 17 00:00:00 2001
From: Aivaras Sev <aivaras.sevelevicius@nfq.com>
Date: Sat, 16 May 2015 18:14:03 +0300
Subject: [PATCH] Terms aggregation size may be 0.

"If set to 0, the size will be set to Integer.MAX_VALUE"
---
 Aggregation/TermsAggregation.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Aggregation/TermsAggregation.php b/Aggregation/TermsAggregation.php
index 98b10e0..3851565 100644
--- a/Aggregation/TermsAggregation.php
+++ b/Aggregation/TermsAggregation.php
@@ -148,7 +148,7 @@ class TermsAggregation extends AbstractAggregation
             ];
         }
 
-        if ($this->size) {
+        if ($this->size !== null) {
             $data['size'] = $this->size;
         }
 
-- 
GitLab