I'm not entirely sure if this is a bug or an enhancement or neither (working as designed). So marking this as discuss for now.
Consider this pipeline simulation:
POST _ingest/pipeline/_simulate
{
"docs": [
{
"_source": {
"foo.bar": 17
}
}],
"pipeline": {
"processors": [
{
"rename": {
"field": "foo.bar",
"target_field": "baz"
}
}
]
}
}
This will return this error response:
{
"docs" : [
{
"error" : {
"root_cause" : [
{
"type" : "exception",
"reason" : "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [foo.bar] doesn't exist",
"header" : {
"processor_type" : "rename"
}
}
],
"type" : "exception",
"reason" : "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [foo.bar] doesn't exist",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "java.lang.IllegalArgumentException: field [foo.bar] doesn't exist",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "field [foo.bar] doesn't exist"
}
},
"header" : {
"processor_type" : "rename"
}
}
}
]
}
However, if we first expand the foo.bar field using the dot_expander processor, it works as expected:
POST _ingest/pipeline/_simulate
{
"docs": [
{
"_source": {
"foo.bar": 17
}
}],
"pipeline": {
"processors": [
{
"dot_expander": {
"field": "foo.bar"
}
},
{
"rename": {
"field": "foo.bar",
"target_field": "baz"
}
}
]
}
}
Successful response:
{
"docs" : [
{
"doc" : {
"_index" : "_index",
"_type" : "_type",
"_id" : "_id",
"_source" : {
"baz" : 17,
"foo" : { }
},
"_ingest" : {
"timestamp" : "2019-01-15T22:42:20.90721Z"
}
}
}
]
}
I'm not entirely sure if this is a bug or an enhancement or neither (working as designed). So marking this as
discussfor now.Consider this pipeline simulation:
This will return this error response:
{ "docs" : [ { "error" : { "root_cause" : [ { "type" : "exception", "reason" : "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [foo.bar] doesn't exist", "header" : { "processor_type" : "rename" } } ], "type" : "exception", "reason" : "java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [foo.bar] doesn't exist", "caused_by" : { "type" : "illegal_argument_exception", "reason" : "java.lang.IllegalArgumentException: field [foo.bar] doesn't exist", "caused_by" : { "type" : "illegal_argument_exception", "reason" : "field [foo.bar] doesn't exist" } }, "header" : { "processor_type" : "rename" } } } ] }However, if we first expand the
foo.barfield using thedot_expanderprocessor, it works as expected:Successful response: