Update multi field inner value using script processor


(Neeraj Mohta) #1

Hi

We want to update multi field type field using ingest node script processor.
For example -
PUT /test_index
{
"mappings": {
"blogpost": {
"properties": {
"comments": {
"type": "nested",
"properties": {
"name":
{
"type": "text",
"fields": {
"converted": {
"type": "keyword",
"index": "not_analyzed"
}
}
}

      }
    }
  }
}

}
}

Script :
PUT _ingest/pipeline/test-pipeline
{
"processors" : [
{
"dot_expander": {
"field": "comments.name"
}
},
{"script": {
"lang": "painless",
"inline": "ctx.comments.name.converted = "test""
}}
]
}

We have tried various modifications in above script like use of doc[],_source, expand dot processor etc but no luck so far.
Can any one just confirm whether its possible or not , to update multi field inner value using script processor.

Thanks,
Neeraj.


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.