diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java index b2b594eadd6..cdec76cc546 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java @@ -87,7 +87,7 @@ public class RestGraphAction extends XPackRestHandler { Hop currentHop = graphRequest.createNextHop(null); try (XContentParser parser = request.contentOrSourceParamParser()) { - QueryParseContext context = new QueryParseContext(parser, parseFieldMatcher); + QueryParseContext context = new QueryParseContext(parser); XContentParser.Token token = parser.nextToken(); diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java index acecfac4d05..bd195765c35 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java @@ -6,7 +6,6 @@ package org.elasticsearch.xpack.watcher.support.search; import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.common.ParseFieldMatcher; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.settings.Settings; @@ -33,13 +32,11 @@ import java.util.Map; public class WatcherSearchTemplateService extends AbstractComponent { private final ScriptService scriptService; - private final ParseFieldMatcher parseFieldMatcher; private final NamedXContentRegistry xContentRegistry; public WatcherSearchTemplateService(Settings settings, ScriptService scriptService, NamedXContentRegistry xContentRegistry) { super(settings); this.scriptService = scriptService; - this.parseFieldMatcher = new ParseFieldMatcher(settings); this.xContentRegistry = xContentRegistry; } @@ -70,7 +67,7 @@ public class WatcherSearchTemplateService extends AbstractComponent { BytesReference source = request.getSearchSource(); if (source != null && source.length() > 0) { try (XContentParser parser = XContentFactory.xContent(source).createParser(xContentRegistry, source)) { - sourceBuilder.parseXContent(new QueryParseContext(parser, parseFieldMatcher)); + sourceBuilder.parseXContent(new QueryParseContext(parser)); searchRequest.source(sourceBuilder); } }