From 43b21719f53bb5849eb3487471e638e0e26685d2 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 2 Jun 2014 13:21:13 +0200 Subject: [PATCH] [TEST] size should start from 1, top_hits aggregation doesn't support size <= 0 --- .../elasticsearch/search/aggregations/bucket/TopHitsTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsTests.java b/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsTests.java index ea5dda563cb..3135cff560c 100644 --- a/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsTests.java +++ b/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsTests.java @@ -171,7 +171,7 @@ public class TopHitsTests extends ElasticsearchIntegrationTest { @Test public void testPagination() throws Exception { - int size = randomIntBetween(0, 10); + int size = randomIntBetween(1, 10); int from = randomIntBetween(0, 10); SearchResponse response = client().prepareSearch("idx").setTypes("type") .addAggregation(terms("terms")