Hi,
I'm copying value of responseBody.results
into embedded_original_value_obj
both are
object
type fields.
This is my defined pipeline -
PUT _ingest/pipeline/apiproxy-embedded-copy
{
"processors": [
{
"set": {
"field": "embedded_original_value_obj",
"copy_from": "responseBody.results",
"ignore_empty_value": true
}
},
{
"set": {
"field": "embedded_error_code",
"copy_from": "embedded_original_value_obj.statusCode",
"ignore_empty_value": true
}
}
]
}
For Testing I'm using this data -
POST _ingest/pipeline/apiproxy-embedded-copy/_simulate
{
"docs": [
{
"_source": {
"responseBody": {
"results": [
{
"userMessage": "SUCCESS",
"hasErrors": false,
"developerMessage": "SUCCESS",
"customerId": "1420371438",
"messageId": null,
"uniqueId": "P0000049373",
"errors": [],
"statusCode": 201
}
]
}
}
}
]
}
output
{
"docs" : [
{
"doc" : {
"_index" : "_index",
"_type" : "_doc",
"_id" : "_id",
"_source" : {
"embedded_original_value_obj" : [
{
"userMessage" : "SUCCESS",
"hasErrors" : false,
"developerMessage" : "SUCCESS",
"customerId" : "1420371438",
"messageId" : null,
"uniqueId" : "P0000049373",
"errors" : [ ],
"statusCode" : 201
}
],
"responseBody" : {
"results" : [
{
"userMessage" : "SUCCESS",
"hasErrors" : false,
"developerMessage" : "SUCCESS",
"customerId" : "1420371438",
"messageId" : null,
"uniqueId" : "P0000049373",
"errors" : [ ],
"statusCode" : 201
}
]
}
},
"_ingest" : {
"timestamp" : "2022-03-01T07:35:59.914902863Z"
}
}
}
]
}
1st set
is working and I'm getting value in embedded_original_value_obj
but 2nd set
isn't working. Any idea how can get value of embedded_original_value_obj.statusCode
value into embedded_error_code