Elasticsearch Mapping Overview
Elasticsearch Mapping Overview,文字内容来自 B 站中华石杉 Elasticsearch 高手进阶课程,英文内容来自官方文档。
Review
To summarize the flow of index requests, this is what happens:
Mapping
mapping,就是 index 的 type 的元数据,每个 type 都有一个自己的 mapping,决定了数据类型,建立倒排索引的行为,还有进行搜索的行为
Mapping is the process of defining how a document, and the fields it contains, are stored and indexed.
Indices created in Elasticsearch 7.0.0 or later no longer accept a _default_ mapping.
In an Elasticsearch index, fields that have the same name in different mapping types are backed by the same Lucene field internally.
Mapping explosion
Defining too many fields in an index can lead to a mapping explosion, which can cause out of memory errors and difficult situations to recover from.
Use the mapping limit settings to limit the number of field mappings (created manually or dynamically) and prevent documents from causing a mapping explosion.