I have an existing index where there are a lot of 'duplicate' field names due to case sensitivity. I would like to reindex this index so it contains only lower case field names.
Judging from the examples it should be possible using the reindex api and painless:
"ctx._source.tag = ctx._source.remove("Tag")"
However, since my index contains 2000+ fields I would rather not have to hard-code the field names of each and every duplicate field.
Is there a more scalable way to do this so it just automatically lower cases every field in the index?