โ Elasticsearch learning pathElasticsearch ยท Module 3 of 10
Indexes, documents and mappings
A mapping defines each field's type, like a schema.
๐ Key ideas
- PUT /products/_doc/1 with a JSON body stores a document.
- GET /products/_doc/1 reads it back.
- Mappings set field types: text, keyword, integer, date, boolean.
- Dynamic mapping guesses types, but explicit mappings avoid surprises.
- You cannot change a field's type in place; you reindex into a new index.
๐ก Real-life example: Like the column headings on an admission form: they decide what goes in each box before anyone fills it.
MappingThe schema of an index
Dynamic mappingElasticsearch guesses field types
ReindexCopy documents into a new index
_docThe endpoint for single documents