Skip to content

Commit 57876bf

Browse files
INGEST: Fix Deprecation Warning in Script Proc. (#32407)
* Using short script form normalized to a map that used 'inline' instead of 'source' so a short form processor definition like: ``` { "script": "ctx.foo= 'bar'" } ``` would always warn about the following deprecation: ``` #! Deprecation: Deprecated field [inline] used, expected [source] ```
1 parent 643235d commit 57876bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/ingest/ConfigurationUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public static Processor readProcessor(Map<String, Processor.Factory> processorFa
361361
return readProcessor(processorFactories, type, (Map<String, Object>) config);
362362
} else if (config instanceof String && "script".equals(type)) {
363363
Map<String, Object> normalizedScript = new HashMap<>(1);
364-
normalizedScript.put(ScriptType.INLINE.getName(), config);
364+
normalizedScript.put(ScriptType.INLINE.getParseField().getPreferredName(), config);
365365
return readProcessor(processorFactories, type, normalizedScript);
366366
} else {
367367
throw newConfigurationException(type, null, null,

0 commit comments

Comments
 (0)