Hi,
I'm using ES 6.2.2.
Could I update a nested object with a new value while keeping the already indexed values?
POST /people/_doc/100
{
"num" : [
{
"numero":"789456123",
"favoris":true
},
{
"numero":"123456798",
"favoris":false
}]}
The Nested hold two set of value, and I would like to index a third one:
POST /people/_doc/100/_update
{
"script" : {
"lang": "painless",
"source": "ctx._source.num =params.new",
"params" : {
"new" : [
{
"numero":"456789123",
"favoris": false
}]}}}
But with this syntax the new one replace the previous set.
Could I put something like :
"source":"ctx._source.num =ctx._source.siret && params.new",
Or:
"source":"ctx._source.num =ctx._source.siret + params.new",
?