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 /core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/ScriptHeuristic.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 'core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/ScriptHeuristic.java')
-rw-r--r-- | core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/ScriptHeuristic.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/ScriptHeuristic.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/ScriptHeuristic.java index 99f3193b56..5f812ae4cc 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/ScriptHeuristic.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/heuristics/ScriptHeuristic.java @@ -26,7 +26,6 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.index.query.QueryParseContext; import org.elasticsearch.index.query.QueryShardContext; import org.elasticsearch.index.query.QueryShardException; import org.elasticsearch.script.ExecutableScript; @@ -149,9 +148,8 @@ public class ScriptHeuristic extends SignificanceHeuristic { return Objects.equals(script, other.script); } - public static SignificanceHeuristic parse(QueryParseContext context) + public static SignificanceHeuristic parse(XContentParser parser) throws IOException, QueryShardException { - XContentParser parser = context.parser(); String heuristicName = parser.currentName(); Script script = null; XContentParser.Token token; |