summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java')
-rw-r--r--core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java
index 764ed3ba73..f7e3d9a61b 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java
@@ -20,6 +20,7 @@ package org.elasticsearch.search.aggregations.bucket;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
+import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.aggregations.bucket.filter.InternalFilter;
import org.elasticsearch.search.aggregations.bucket.significant.SignificantTerms;
@@ -99,10 +100,10 @@ public class TermsShardMinDocCountIT extends ESIntegTestCase {
String sourceClass = "{\"text\": \"" + term + "\", \"class\":" + "true" + "}";
String sourceNotClass = "{\"text\": \"" + term + "\", \"class\":" + "false" + "}";
for (int i = 0; i < numInClass; i++) {
- builders.add(client().prepareIndex(index, type).setSource(sourceClass));
+ builders.add(client().prepareIndex(index, type).setSource(sourceClass, XContentType.JSON));
}
for (int i = 0; i < numNotInClass; i++) {
- builders.add(client().prepareIndex(index, type).setSource(sourceNotClass));
+ builders.add(client().prepareIndex(index, type).setSource(sourceNotClass, XContentType.JSON));
}
}
@@ -152,7 +153,7 @@ public class TermsShardMinDocCountIT extends ESIntegTestCase {
private void addTermsDocs(String term, int numDocs, List<IndexRequestBuilder> builders) {
String sourceClass = "{\"text\": \"" + term + "\"}";
for (int i = 0; i < numDocs; i++) {
- builders.add(client().prepareIndex(index, type).setSource(sourceClass));
+ builders.add(client().prepareIndex(index, type).setSource(sourceClass, XContentType.JSON));
}
}