Elasticsearch & Lucene (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What is Dynamic Mapping and what are its risks in production?
junior LevelelasticsearchBasic
In Simple Words: Dynamic mapping automatically detects field types from incoming JSON and creates mapping definitions dynamically:
- Risk (Mapping Explosion): If users send arbitrary or unbounded JSON keys (e.g. user-generated tags as key names), thousands of new fields are created in the cluster state.
- Consequence: Cluster state balloons in memory across all nodes, causing high JVM heap pressure and cluster instability. In production, always define explicit mappings or set
dynamic: strict.