script params doesn't support values of type: START_ARRAY in ElasticSearch v7.3 Update script script params doesn't support values of type: START_ARRAY in ElasticSearch v7.3 Update script elasticsearch elasticsearch

script params doesn't support values of type: START_ARRAY in ElasticSearch v7.3 Update script


Your params section must not be an array, but an object, use this script instead:

{  "script": {    "source": "ctx._source.hasParts.add(params.haspart)",    "lang": "painless",    "params": {        "haspart": [          {            "documentLevel": 3,            "levelProperties": {              //some properties            }          },          {            "documentLevel": 3,            "levelProperties": {              //some properties            }          },          {            "documentLevel": 3,            "levelProperties": {              //some properties            }          },          {            "documentLevel": 3,            "levelProperties": {              //some properties            }          },          {            "documentLevel": 3,            "levelProperties": {              //some properties            }          }        ]    }  }}