Elastic Search update api - updating complex data including array objects and parts of document

If i understand your question correcttly you want to update array inside the existing document.

There are 2 option:

  1. you can send entire new json/document (with updated array) to index and it will replace exsiting document.
  2. you can use script with upsert to updating document. Please check official document for upsert with script.

Below are some other link which will help you to resolved this: