I need to rename several indexes in a cluster (their name must be changed, I cannot use aliases).
I saw that there are no supported ways to do that,
Another different way to achieve the renaming or change the mappings for an index is to reindex using logstash. Here is a sample of the logstash 2.1 configuration:
input {
elasticsearch {
hosts => ["es01.example.com", "es02.example.com"]
index => "old-index-name"
size => 500
scroll => "5m"
}
}
filter {
mutate {
remove_field => [ "@version" ]
}
date {
"match" => [ "custom_timestamp", "MM/dd/YYYY HH:mm:ss" ]
target => "@timestamp"
}
}
output {
elasticsearch {
hosts => ["es01.example.com", "es02.example.com" ]
manage_template => false
index => "new-index-name"
}
}