Home / Companies / Elastic / Blog / Post Details
Content Deep Dive

Removal of mapping types in Elasticsearch 6.0

Blog post from Elastic

Post Details
Company
Date Published
Author
-
Word Count
1,681
Language
-
Hacker News Points
-
Summary

Elasticsearch 6.0 marks the beginning of a transition away from using mapping types, allowing only a single mapping type per index and setting the stage for their complete removal in version 7.0. Historically, mapping types were used to categorize different kinds of documents within an index, similar to tables in a SQL database, but led to complications due to shared field definitions across types, which could hinder data compression and efficiency. As a solution, Elasticsearch encourages users to adopt alternatives such as using a custom type field or creating separate indices for different document types, which can improve data density and search accuracy. The gradual phase-out of mapping types is planned to minimize disruption, with ongoing support for backward compatibility features until version 9.0, and new methods such as the join field replacing parent-child relationships. Users are advised to migrate multi-type indices to single-type configurations using the Reindex API to align with these changes.