Append ingest processor stringifies arrays instead of processing the elements one by one

Hello, it seems that the append processor "stringifies" input arrays instead of processing the elements one by one. Could that be? (Using elasticsearch 8.6.2)

Pipeline:

    "description": "testing issues with append",
    "processors": [
      {
        "append": {
          "field": "copy_to",
          "value": [
            "{{{from}}}"
          ],
          "ignore_failure": true
        }
      }
    ]

Test document:

[
  {
    "_index": "o",
    "_id": "i",
    "_source": {
      "from": [
        2,
        3
      ]
    }
  }
]

Simulated output:

{
  "docs": [
    {
      "doc": {
        "_index": "o",
        "_id": "i",
        "_version": "-3",
        "_source": {
          "copy_to": [
            "{0=2, 1=3}"
          ],
          "from": [
            2,
            3
          ]
        },
        "_ingest": {
          "timestamp": "2023-05-15T16:11:17.691991822Z"
        }
      }
    }
  ]
}

I'd expect copy_to to be [2, 3], not {0=2, 1=3}.

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