DBAtlas · Database operations atlas

illegal_argument_exception_total_fields: Limit of total fields has been exceeded

Elasticsearch

What does it mean?

The total number of fields in an index mapping exceeded the allowed upper limit (index.mapping.total_fields.limit, default 1000). Indexing fails because new fields cannot be added.

Why does it happen?

Usually a mapping explosion: with dynamic mapping enabled, unstructured/variable-key JSON documents (e.g. objects whose keys come from user data) add every new field to the mapping. Over time the field count grows rapidly and hits the limit.

How to fix it

To fix the root cause, model variable-key data with a flattened field or as an array of key-value pairs instead of objects; restrict dynamic mapping (dynamic: false or strict). If you genuinely need more fields, raise the limit carefully: PUT idx/_settings {"index.mapping.total_fields.limit": 2000}. Monitor for mapping explosion by checking the field count with GET idx/_mapping.

Open in DBAtlas →

More from this engine