A template is consulted at index creation and never again, so changing it does not affect an index that already exists.
PUT /_index_template/products
{ "index_patterns": ["products-*"],
"template": { "mappings": { "properties": {
"sku": { "type": "keyword" } } } } }
# products-2022 already exists with sku as text.
# the template changes nothing about it.
# the only route: create a new index, reindex, swap the
# alias. there is no ALTER for a mapping.
Mappings are immutable for existing fields, which is the constraint behind this and behind most Elasticsearch operational work — a field type decided in 2019 is decided until somebody reindexes. Building every index behind an alias from the start is what turns that from a project into a routine operation.