Update Nested

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" : [

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" : [
              "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",
"source":"ctx._source.num =ctx._source.siret + params.new", ?

I know that ES have to reindex the whole thing each time, but I don't understand how to do it with a nested object when I easily could with a normal field.

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