forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ignore_empty_value parameter in set ingest processor (elastic#57030)
- Loading branch information
1 parent
3d0c8da
commit f7b48a2
Showing
5 changed files
with
107 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/270_set_processor.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
teardown: | ||
- do: | ||
ingest.delete_pipeline: | ||
id: "1" | ||
ignore: 404 | ||
|
||
--- | ||
"Test set processor with template value": | ||
- do: | ||
ingest.put_pipeline: | ||
id: "1" | ||
body: > | ||
{ | ||
"processors": [ | ||
{ | ||
"set" : { | ||
"field" : "foo", | ||
"value" : "{{bar}}", | ||
"ignore_empty_value" : true | ||
} | ||
} | ||
] | ||
} | ||
- match: { acknowledged: true } | ||
|
||
- do: | ||
index: | ||
index: test | ||
id: 1 | ||
pipeline: "1" | ||
body: { | ||
foo: "hello" | ||
} | ||
- do: | ||
index: | ||
index: test | ||
id: 2 | ||
pipeline: "1" | ||
body: { | ||
foo: "hello", | ||
bar: "" | ||
} | ||
|
||
- do: | ||
get: | ||
index: test | ||
id: 1 | ||
- match: { _source.foo: "hello" } | ||
|
||
- do: | ||
get: | ||
index: test | ||
id: 2 | ||
- match: { _source.foo: "hello" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters