-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Elasticsearch version:
Version: 7.5.1, Build: default/tar/3ae9ac9a93c95bd0cdc054951cf95d88e1e18d96/2019-12-16T22:57:37.835892Z, JVM: 11.0.5
JVM version:
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)
OS version:
Linux 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 16 14:19:51 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
The set_security_user processor simply overwrites an already existing target field provided in field instead of merging it with existing data and only overwriting the fields specified in properties.
I'm not sure if this is a bug or works as intended, but at least the documentation should then make clear that an existing field's data is lost when using this processor.
Steps to reproduce:
- Simulate pipeline
POST /_ingest/pipeline/_simulate?verbose=true
{
"docs": [
{
"_index": "gh-51428",
"_source": {
"user" : {
"id": "123",
"name": "testuser",
"email": "test@user"
}
}
}
],
"pipeline": {
"processors": [
{
"set_security_user": {
"field": "user",
"properties": [
"username"
]
}
}
]
}
}
- Result
{
"docs" : [
{
"processor_results" : [
{
"doc" : {
"_index" : "gh-51428",
"_type" : "_doc",
"_id" : "_id",
"_source" : {
"user" : {
"username" : "someuser"
}
},
"_ingest" : {
"timestamp" : "2020-01-24T15:55:40.964116Z"
}
}
}
]
}
]
}