I've followed is guide in an attempt to apply a new (reduced) mapping to an existing index :
I realise that this is a very old blog post. The "atomic" step which is said to re-index , doesn't seem to index any documents.
I've tried creating a new index with the reduced mappings and using the _reindex endpoint to copy over documents, but this seems to overwrite the mapping that I have added to the new index with the mappings from the original index.
Yea, you are correct in using _reindex API as that is required to reindex documents from old to new index. However, if your new index has reduced mapping, in other words, fields "missing", mapping for missing fields is added automatically as default.
To get around this, you may choose to selectively reindex fields. Check this out ... https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-filter-source
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.