Opensearch adding new value to the old one

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensearch 2.8.0

Describe the issue:
I have an opensearch and logstash stack; logstash sending logs from the base and i need to not just replace old values(that’s already works with method update in logstash and templates in opensearch), but adding new to them(something like concatenation).
Is it possible?


Relevant Logs or Screenshots:

You can use the update API of OpenSearch to append a value to an existing array field, like this:

POST test/_update/1
  "script": {
    "source": "ctx._source.tags.add(params.tag)",
    "lang": "painless",
    "params": {
      "tag": "blue"