[fix] JSON Processor was not properly added (#20613)
This commit is contained in:
parent
550a0449bc
commit
92ab44d35c
|
@ -62,6 +62,7 @@ public class IngestCommonPlugin extends Plugin implements IngestPlugin {
|
|||
processors.put(GrokProcessor.TYPE, new GrokProcessor.Factory(builtinPatterns));
|
||||
processors.put(ScriptProcessor.TYPE, new ScriptProcessor.Factory(parameters.scriptService));
|
||||
processors.put(DotExpanderProcessor.TYPE, new DotExpanderProcessor.Factory());
|
||||
processors.put(JsonProcessor.TYPE, new JsonProcessor.Factory());
|
||||
return Collections.unmodifiableMap(processors);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,12 +19,13 @@
|
|||
- match: { nodes.$master.ingest.processors.7.type: grok }
|
||||
- match: { nodes.$master.ingest.processors.8.type: gsub }
|
||||
- match: { nodes.$master.ingest.processors.9.type: join }
|
||||
- match: { nodes.$master.ingest.processors.10.type: lowercase }
|
||||
- match: { nodes.$master.ingest.processors.11.type: remove }
|
||||
- match: { nodes.$master.ingest.processors.12.type: rename }
|
||||
- match: { nodes.$master.ingest.processors.13.type: script }
|
||||
- match: { nodes.$master.ingest.processors.14.type: set }
|
||||
- match: { nodes.$master.ingest.processors.15.type: sort }
|
||||
- match: { nodes.$master.ingest.processors.16.type: split }
|
||||
- match: { nodes.$master.ingest.processors.17.type: trim }
|
||||
- match: { nodes.$master.ingest.processors.18.type: uppercase }
|
||||
- match: { nodes.$master.ingest.processors.10.type: json }
|
||||
- match: { nodes.$master.ingest.processors.11.type: lowercase }
|
||||
- match: { nodes.$master.ingest.processors.12.type: remove }
|
||||
- match: { nodes.$master.ingest.processors.13.type: rename }
|
||||
- match: { nodes.$master.ingest.processors.14.type: script }
|
||||
- match: { nodes.$master.ingest.processors.15.type: set }
|
||||
- match: { nodes.$master.ingest.processors.16.type: sort }
|
||||
- match: { nodes.$master.ingest.processors.17.type: split }
|
||||
- match: { nodes.$master.ingest.processors.18.type: trim }
|
||||
- match: { nodes.$master.ingest.processors.19.type: uppercase }
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
teardown:
|
||||
- do:
|
||||
ingest.delete_pipeline:
|
||||
id: "1"
|
||||
ignore: 404
|
||||
|
||||
---
|
||||
"Test JSON Processor":
|
||||
- do:
|
||||
ingest.put_pipeline:
|
||||
id: "1"
|
||||
body: >
|
||||
{
|
||||
"processors": [
|
||||
{
|
||||
"json" : {
|
||||
"field" : "foo"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
- match: { acknowledged: true }
|
||||
|
||||
- do:
|
||||
index:
|
||||
index: test
|
||||
type: test
|
||||
id: 1
|
||||
pipeline: "1"
|
||||
body: {
|
||||
foo: "{\"hello\": \"world\"}"
|
||||
}
|
||||
|
||||
- do:
|
||||
get:
|
||||
index: test
|
||||
type: test
|
||||
id: 1
|
||||
- match: { _source.foo.hello: "world" }
|
Loading…
Reference in New Issue