I have created an ingest pipeline that is being used from my logstash output plugin for elasticsearch. This pipeline only does some renaming of fields.
Now, this 'rename' processor is working fine for leaf or nested fields but not for arrays fields. Can someone please help and correct me?
In my example, 'models' is the array for which rename processor is failing. What would be the syntax?
PUT _ingest/pipeline/rename_model
{
"processors": [
{
"rename": {
"field": "brand_id",
"target_field": "brandId",
"ignore_missing": true
}
},
{
"rename": {
"field": "version.date_year",
"target_field": "version.year",
"ignore_missing": true
}
},
{
"rename": {
"field": "models.model_id",
"target_field": "models.modelId",
"ignore_missing": true
}
}
]
}
POST _ingest/pipeline/rename_model/_simulate
{
"docs": [
{
"_source": {
"brand_id": "hello",
"brand_name": "HI",
"version": {
"date_year": 2018
},
"models": [
{
"model_number": "Test1",
"model_id": 123
},
{
"model_number": "Test2",
"model_id": 456
}
]
}
}
]
}