From dcf5ce7a4e956e7b9d430d14a6c06f618f154b59 Mon Sep 17 00:00:00 2001 From: javanna Date: Thu, 12 Jan 2017 11:36:29 +0100 Subject: [PATCH] Remove ParseFieldMatcher usages from QueryParseContext Original commit: elastic/x-pack-elasticsearch@93423ca15c27814588c8c51d0b2211201a389c79 --- .../xpack/graph/rest/action/RestGraphAction.java | 2 +- .../watcher/support/search/WatcherSearchTemplateService.java | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) 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); } }