From 5eb8a603c921cf32961c9ac361a8a44f80480585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Thu, 14 Apr 2016 16:23:51 +0200 Subject: [PATCH] Adapt to api change in es core Original commit: elastic/x-pack-elasticsearch@4d6f6abf0296fdadd57dea30803733b6c289ce3d --- .../watcher/support/WatcherUtils.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/WatcherUtils.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/WatcherUtils.java index bc3cceba7f7..86f3067c83d 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/WatcherUtils.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/WatcherUtils.java @@ -5,6 +5,17 @@ */ package org.elasticsearch.watcher.support; +import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.elasticsearch.watcher.support.WatcherDateTimeUtils.formatDate; + +import java.io.IOException; +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchType; @@ -27,17 +38,6 @@ import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.watch.Payload; import org.joda.time.DateTime; -import java.io.IOException; -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; - -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.watcher.support.WatcherDateTimeUtils.formatDate; - /** */ public final class WatcherUtils { @@ -113,7 +113,7 @@ public final class WatcherUtils { if (token == XContentParser.Token.FIELD_NAME) { currentFieldName = parser.currentName(); if (ParseFieldMatcher.STRICT.match(currentFieldName, BODY_FIELD)) { - searchRequest.source(SearchSourceBuilder.fromXContent(parser, context, aggParsers, suggesters)); + searchRequest.source(SearchSourceBuilder.fromXContent(context, aggParsers, suggesters)); } } else if (token == XContentParser.Token.START_ARRAY) { if (ParseFieldMatcher.STRICT.match(currentFieldName, INDICES_FIELD)) {