Change type and reindex in Elasticsearch Change type and reindex in Elasticsearch elasticsearch elasticsearch

Change type and reindex in Elasticsearch


For Elasticsearch 6, a few small changes are required. Otherwise follow all the instructions closely.

To obtain the mapping use pretty=true instead of pretty=1:

curl -XGET http://localhost:9200/logstash-2016.05.30/_mapping?pretty=true > logstash-2016.05.30

For all XPUT/XPOST requests, the content type must now be set to application/json.

curl -XPUT  http://localhost:9200/logstash-2016.05.30_new \  -H 'Content-Type: application/json' -d @logstash-2016.05.30