I am trying to index json documents in ElasticSearch with dynamic mappings on. Some of the documents have unpredictable number of keys (nested levels) because of which I started
For Total Field
PUT <index_name>/_settings { "index.mapping.total_fields.limit": 2000 }
For depth limit
PUT <index_name>/_settings { "index.mapping.depth.limit": 2 }
https://www.elastic.co/guide/en/elasticsearch/reference/master/mapping.html