From 12c19508fb55e6854b6499de45e4ef9a1fa89b04 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Thu, 30 Apr 2015 19:14:56 +0200 Subject: [PATCH] Tests: Fix test bug in aggregations' EquivalenceTests due to the change of the default min_doc_count. --- .../elasticsearch/search/aggregations/EquivalenceTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/search/aggregations/EquivalenceTests.java b/src/test/java/org/elasticsearch/search/aggregations/EquivalenceTests.java index 5079e6730dd..d318ed5ca7b 100644 --- a/src/test/java/org/elasticsearch/search/aggregations/EquivalenceTests.java +++ b/src/test/java/org/elasticsearch/search/aggregations/EquivalenceTests.java @@ -42,7 +42,6 @@ import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory import org.elasticsearch.search.aggregations.metrics.sum.Sum; import org.elasticsearch.test.ElasticsearchIntegrationTest; -import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -303,7 +302,7 @@ public class EquivalenceTests extends ElasticsearchIntegrationTest { SearchResponse resp = client().prepareSearch("idx") .addAggregation(terms("terms").field("values").collectMode(randomFrom(SubAggCollectionMode.values())).script("floor(_value / interval)").param("interval", interval).size(maxNumTerms)) - .addAggregation(histogram("histo").field("values").interval(interval)) + .addAggregation(histogram("histo").field("values").interval(interval).minDocCount(1)) .execute().actionGet(); assertSearchResponse(resp);