fix wrong parse field

Original commit: elastic/x-pack-elasticsearch@d017fb3e63
This commit is contained in:
Martijn van Groningen 2015-05-07 16:50:52 +02:00
parent f198b1bbae
commit a90d5a581e

View File

@ -189,7 +189,7 @@ public final class WatcherUtils {
throw new SearchRequestParseException("could not read search request. unexpected template field [" + currentFieldName + "]");
}
} else if (token == XContentParser.Token.START_OBJECT) {
if (TEMPLATE_TYPE_FIELD.getPreferredName().equals(currentFieldName)) {
if (TEMPLATE_PARAMS_FIELD.getPreferredName().equals(currentFieldName)) {
searchRequest.templateParams(flattenModel(parser.map()));
}
} else {