diff options
author | Christoph Büscher <christoph@elastic.co> | 2017-07-03 17:30:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-03 17:30:40 +0200 |
commit | f576c987ce2615f77a8de75741b0f5448229805f (patch) | |
tree | 11f9e39ce1ad847b65c8c423d99d7c46d8fd7cca /modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java | |
parent | 0e2cfc66bb8ad091d3cf5ade2833f9688af1240c (diff) |
Remove QueryParseContext (#25486)
QueryParseContext is currently only used as a wrapper for an XContentParser, so
this change removes it entirely and changes the appropriate APIs that use it so
far to only accept a parser instead.
Diffstat (limited to 'modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java')
-rw-r--r-- | modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java b/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java index d1e6377b69..2dd9b34e6b 100644 --- a/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java +++ b/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java @@ -33,8 +33,6 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryParseContext; -import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.TemplateScript; @@ -110,7 +108,7 @@ public class TransportSearchTemplateAction extends HandledTransportAction<Search try (XContentParser parser = XContentFactory.xContent(XContentType.JSON).createParser(xContentRegistry, source)) { SearchSourceBuilder builder = SearchSourceBuilder.searchSource(); - builder.parseXContent(new QueryParseContext(parser)); + builder.parseXContent(parser); builder.explain(searchTemplateRequest.isExplain()); builder.profile(searchTemplateRequest.isProfile()); searchRequest.source(builder); |