0PricingLogin
Elasticsearch & Full Text Search Systems · Lesson

Dynamic vs. Explicit Mappings

Understand the trade-offs between dynamic mapping and explicitly defined mappings, and how to control dynamic mapping behavior.

Mappings: Schema for Data

When you put data into Elasticsearch, it needs to know what kind of data each field holds. This definition is called a mapping.

Think of a mapping as the schema for your documents, similar to a table schema in a traditional database.

There are two main ways Elasticsearch handles mappings: dynamic (automatic) and explicit (manual).

Dynamic Mapping: Auto-Schema

Dynamic mapping is Elasticsearch's default behavior. It's like an intelligent assistant that tries to guess the data type of new fields automatically.

When you index a document with a new field that Elasticsearch hasn't seen before, it analyzes the field's value and assigns a default mapping to it.

All lessons in this course

  1. Customizing Field Mappings
  2. Dynamic vs. Explicit Mappings
  3. Index Templates and Aliases
  4. Nested and Object Field Types
← Back to Elasticsearch & Full Text Search Systems