in elastic/shared/parameter_sources/templates.py [0:0]
def remove_routing_shards(content, remove):
if not remove:
return content
if "template" in content and "settings" in content["template"] and "index" in content["template"]["settings"]:
if "number_of_routing_shards" in content["template"]["settings"]["index"]:
del content["template"]["settings"]["index"]["number_of_routing_shards"]
return content