Elasticsearch: How do you delete a mapping type without deleting an entire index?

To answer your question, I believe it was yanked out for reliability and maybe performance optimizations when the mappings get shipped around the cluster.

The reason why it's hard to change anything in ES index is because the underlying storage is an inverted index, and any data that you have put in has been already indexed with those mapping rules.

Elasticsearch lowers the barrier of entry into search, but has some pretty complicated stuff going under the hood.


An example of potential problem with deleting types/mapping and the explanation for disabling can be found in elasticsearch issue : 8877. Extract from issue description :

Currently, a user can delete a type entirely, which deletes the type, all documents of that type, and removes the associated fields. Unfortunately, if any documents of that type have already been indexed, then the fields are part of the index. Adding fields with the same name but a different data type will cause conflicts later on.

Currently reindex is the only option however to alleviate the problem of reindexing on client end seems like there maybe a possiblity of support for reindex api in future : see issue:16207 and issue:#15201 for more details.