Continuously getting - java.lang.IllegalArgumentException: Limit of total fields [1000] in index has been exceeded error

You can update limit of total fields after index has been created:

PUT my_index/_settings
{
"index.mapping.total_fields.limit": 2000
}

Note too many fields will lead to mapping explosion, which is a not good practice.