Change TODO comments for removing old Script API to 3.0

This commit is contained in:
Colin Goodheart-Smithe 2015-07-02 11:20:17 +01:00
parent 6765635067
commit 11e851eb0c
5 changed files with 5 additions and 5 deletions

View File

@ -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 + "]");

View File

@ -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 + "]");

View File

@ -97,7 +97,7 @@ public abstract class AbstractScriptParser<S extends Script> {
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);

View File

@ -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);

View File

@ -70,7 +70,7 @@ public class ValuesSourceParser<VS extends ValuesSource> {
String field = null;
Script script = null;
@Deprecated
Map<String, Object> params = null; // TODO Remove in 2.0
Map<String, Object> params = null; // TODO Remove in 3.0
ValueType valueType = null;
String format = null;
Object missing = null;