diff options
Diffstat (limited to 'core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java')
-rw-r--r-- | core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java index ca88b56cd4..f431cb0a47 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java @@ -23,6 +23,7 @@ import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.support.XContentMapValues; import org.elasticsearch.env.Environment; import org.elasticsearch.plugins.Plugin; @@ -230,22 +231,22 @@ public class ScriptedMetricIT extends ESIntegTestCase { assertAcked(client().admin().cluster().preparePutStoredScript() .setLang(CustomScriptPlugin.NAME) .setId("initScript_stored") - .setContent(new BytesArray("{\"script\":\"vars.multiplier = 3\"}"))); + .setContent(new BytesArray("{\"script\":\"vars.multiplier = 3\"}"), XContentType.JSON)); assertAcked(client().admin().cluster().preparePutStoredScript() .setLang(CustomScriptPlugin.NAME) .setId("mapScript_stored") - .setContent(new BytesArray("{\"script\":\"_agg.add(vars.multiplier)\"}"))); + .setContent(new BytesArray("{\"script\":\"_agg.add(vars.multiplier)\"}"), XContentType.JSON)); assertAcked(client().admin().cluster().preparePutStoredScript() .setLang(CustomScriptPlugin.NAME) .setId("combineScript_stored") - .setContent(new BytesArray("{\"script\":\"sum agg values as a new aggregation\"}"))); + .setContent(new BytesArray("{\"script\":\"sum agg values as a new aggregation\"}"), XContentType.JSON)); assertAcked(client().admin().cluster().preparePutStoredScript() .setLang(CustomScriptPlugin.NAME) .setId("reduceScript_stored") - .setContent(new BytesArray("{\"script\":\"sum aggs of agg values as a new aggregation\"}"))); + .setContent(new BytesArray("{\"script\":\"sum aggs of agg values as a new aggregation\"}"), XContentType.JSON)); indexRandom(true, builders); ensureSearchable(); |