Q:

How to remove multiple fields from index?

I would like to remove multiple fields from index for example ('person_full','company_full'). Using ES: 5.6.14
To delete one field -> following code is working well
POST firma-2019.04/_update_by_query?conflicts=proceed
{
    "script": {
        "source": "ctx._source.remove('person_full')",
        "lang": "painless"
    }
}

But I would like to delete multiple fields at once and this code does not work.
POST firma-2019.04/_update_by_query?conflicts=proceed
{
    "script": {
        "source": "ctx._source.remove('person_full','company_full')",
        "lang": "painless"
    }
}

Thank you in advance for your Help

A:

The below query should work:
POST firma-2019.04/_update_by_query?conflicts=proceed
{
    "script": {
        "source": "ctx._source.remove('person_full');ctx._source.remove('company_full')",
        "lang": "painless"
    }
}

To delete more fields add more remove statements in the script. 

