From 11e851eb0caec749352078a3c3fdbc75a1addbbc Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Thu, 2 Jul 2015 11:20:17 +0100 Subject: [PATCH] Change TODO comments for removing old Script API to 3.0 --- .../java/org/elasticsearch/index/query/ScriptQueryParser.java | 2 +- .../query/functionscore/script/ScriptScoreFunctionParser.java | 2 +- .../java/org/elasticsearch/script/AbstractScriptParser.java | 2 +- .../bucket/significant/heuristics/ScriptHeuristic.java | 2 +- .../search/aggregations/support/ValuesSourceParser.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/query/ScriptQueryParser.java b/core/src/main/java/org/elasticsearch/index/query/ScriptQueryParser.java index 9912cb94bac..22aaeff4b11 100644 --- a/core/src/main/java/org/elasticsearch/index/query/ScriptQueryParser.java +++ b/core/src/main/java/org/elasticsearch/index/query/ScriptQueryParser.java @@ -82,7 +82,7 @@ public class ScriptQueryParser implements QueryParser { } else if (token == XContentParser.Token.START_OBJECT) { if (ScriptField.SCRIPT.match(currentFieldName)) { script = Script.parse(parser); - } else if ("params".equals(currentFieldName)) { // TODO remove in 2.0 (here to support old script APIs) + } else if ("params".equals(currentFieldName)) { // TODO remove in 3.0 (here to support old script APIs) params = parser.map(); } else { throw new QueryParsingException(parseContext, "[script] query does not support [" + currentFieldName + "]"); diff --git a/core/src/main/java/org/elasticsearch/index/query/functionscore/script/ScriptScoreFunctionParser.java b/core/src/main/java/org/elasticsearch/index/query/functionscore/script/ScriptScoreFunctionParser.java index 72a592da5b3..0049357cb9b 100644 --- a/core/src/main/java/org/elasticsearch/index/query/functionscore/script/ScriptScoreFunctionParser.java +++ b/core/src/main/java/org/elasticsearch/index/query/functionscore/script/ScriptScoreFunctionParser.java @@ -69,7 +69,7 @@ public class ScriptScoreFunctionParser implements ScoreFunctionParser { } else if (token == XContentParser.Token.START_OBJECT) { if (ScriptField.SCRIPT.match(currentFieldName)) { script = Script.parse(parser); - } else if ("params".equals(currentFieldName)) { // TODO remove in 2.0 (here to support old script APIs) + } else if ("params".equals(currentFieldName)) { // TODO remove in 3.0 (here to support old script APIs) vars = parser.map(); } else { throw new QueryParsingException(parseContext, NAMES[0] + " query does not support [" + currentFieldName + "]"); diff --git a/core/src/main/java/org/elasticsearch/script/AbstractScriptParser.java b/core/src/main/java/org/elasticsearch/script/AbstractScriptParser.java index f03edce9682..be1e3c2a3b6 100644 --- a/core/src/main/java/org/elasticsearch/script/AbstractScriptParser.java +++ b/core/src/main/java/org/elasticsearch/script/AbstractScriptParser.java @@ -97,7 +97,7 @@ public abstract class AbstractScriptParser { throw new ScriptParseException("expected an object for field [{}], but found [{}]", currentFieldName, token); } } else { - // TODO remove this in 2.0 + // TODO remove this in 3.0 ScriptType paramScriptType = getAdditionalScriptParameters().get(currentFieldName); if (paramScriptType != null) { script = parseInlineScript(parser); 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 d764af4ccc9..faadd1d396a 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 @@ -142,7 +142,7 @@ public class ScriptHeuristic extends SignificanceHeuristic { } else if (token == XContentParser.Token.START_OBJECT) { if (ScriptField.SCRIPT.match(currentFieldName)) { script = Script.parse(parser); - } else if ("params".equals(currentFieldName)) { // TODO remove in 2.0 (here to support old script APIs) + } else if ("params".equals(currentFieldName)) { // TODO remove in 3.0 (here to support old script APIs) params = parser.map(); } else { throw new ElasticsearchParseException("failed to parse [{}] significance heuristic. unknown object [{}]", heuristicName, currentFieldName); diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/support/ValuesSourceParser.java b/core/src/main/java/org/elasticsearch/search/aggregations/support/ValuesSourceParser.java index 01efe5eb2cc..fc34b5e4732 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/support/ValuesSourceParser.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/support/ValuesSourceParser.java @@ -70,7 +70,7 @@ public class ValuesSourceParser { String field = null; Script script = null; @Deprecated - Map params = null; // TODO Remove in 2.0 + Map params = null; // TODO Remove in 3.0 ValueType valueType = null; String format = null; Object missing = null;