Dynamic mapping
Dynamic mapping is automatic generation or updating of a data index’s field mappings from the fields and values encountered in newly indexed documents.
Elasticsearch in Action, Second Edition
Dynamic mapping is Elasticsearch behavior that automatically derives an index mapping from the fields and values of newly indexed documents.
- How it is used
- Enables rapid indexing during development or testing without declaring field mappings first.
- How deep it goes
- Explains value-based type inference, date rules, multi-fields, array behavior, and sorting failures; defers detailed core data types.
- Examples
- Uses movie title, rating, and release date fields, plus quoted student ages and age.keyword sorting.
- What you can do after
- Evaluate/understand when inferred field types support querying and sorting and when explicit mappings are safer.
Read how Elasticsearch in Action, Second Edition explains dynamic mapping →
MongoDB 8.0 in Action, Third Edition
Dynamic mapping is an Atlas Search index setting that automatically indexes fields discovered in documents according to inferred field types.
- How it is used
- Configures Atlas Search to discover and index supported fields automatically, especially for convenient setup and test environments.
- How deep it goes
- Explains automatic field discovery, resource trade-offs, static alternatives, and lifecycle commands without descending into indexing internals.
- Examples
- Uses the LocalSearchIndex on inspections, configuration inspection, fuzzy search, ranked results, and index deletion.
- What you can do after
- Operate Atlas Search indexes by creating, inspecting, updating, querying, and dropping dynamically mapped indexes.
Read how MongoDB 8.0 in Action, Third Edition explains dynamic mapping →
Related concepts
- static mappingalternative to · Static mapping is a search-index configuration that explicitly defines which document fields and subfields are indexed and how they are mapped.
- mappingalternative to · An Elasticsearch mapping is configuration that defines indexed document fields, their data types, and their indexing and handling rules.
- schemaproduces · A data schema is a formal specification of the structure, fields, types, relationships, and constraints of data.
- text fieldproduces · A text field is a schema field that stores analyzed textual content for full-text search.
- automatic index creationused by · Automatic index creation is Elasticsearch behavior that creates a missing index when an indexing request targets it.
- longproduces · A long is a language-designated integer type whose precision, range, and representation are defined by the language or implementation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

