o by an alias my $old_index_name = $model->es->cat->aliases(name => $doc_type, format => 'json')->[0]->{index}; # Switch the alias to the new index, and remove the alias from the old