From 33653a8865ba1b1aa4e9040ab3a01665e18cbaf1 Mon Sep 17 00:00:00 2001 From: javanna Date: Sat, 31 Dec 2016 11:47:03 +0100 Subject: [PATCH] Remove ParseFieldMatcher usage from SearchRequest Original commit: elastic/x-pack-elasticsearch@e1b08ab80107d3620d8a656d2e76b3fe8ef56831 --- .../support/search/WatcherSearchTemplateRequest.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequest.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequest.java index e6ea7b202c7..96c547b84fb 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequest.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequest.java @@ -16,14 +16,10 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.index.query.QueryParseContext; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.SearchRequestParsers; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.common.text.TextTemplate; import java.io.IOException; import java.util.ArrayList; @@ -269,7 +265,7 @@ public class WatcherSearchTemplateRequest implements ToXContent { String typesStr = parser.text(); types.addAll(Arrays.asList(Strings.delimitedListToStringArray(typesStr, ",", " \t"))); } else if (SEARCH_TYPE_FIELD.match(currentFieldName)) { - searchType = SearchType.fromString(parser.text().toLowerCase(Locale.ROOT), ParseFieldMatcher.EMPTY); + searchType = SearchType.fromString(parser.text().toLowerCase(Locale.ROOT)); } else { throw new ElasticsearchParseException("could not read search request. unexpected string field [" + currentFieldName + "]");