# Multi routing in template aliases

**URL:** <https://discuss.elastic.co/t/multi-routing-in-template-aliases/19620>\
**Category:** Elasticsearch\
**Created:** [September 4, 2014, 10:56am UTC](https://discuss.elastic.co/t/multi-routing-in-template-aliases/19620 "2014-09-04T10:56:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [September 4, 2014, 10:56am UTC](https://discuss.elastic.co/t/multi-routing-in-template-aliases/19620/1 "2014-09-04T10:56:11Z")

</div>

Hi,

Is there a way to set multi routing in a template aliases like we can do in  
search requests?

Ex. ofmulti routing "working" search request: curl -XGET  
'[http://localhost:9200/forum/\_search?routing=secutenant,usertenant](http://localhost:9200/forum/_search?routing=secutenant,usertenant)' -d  
'{...}'

Here is the kind of template I like to set but that doesn't take in account  
the multi routing on the secutenant alias:  
'{  
"order" : 1,  
"template" : "test-\*",  
"settings" : {  
"number\_of\_shards": 24  
},  
"mappings" : {  
"_default_" : {  
"\_source" : {  
"enabled" : true  
},  
"\_routing" : {  
"required" : true,  
"path" : "@project"  
}  
}  
},  
"aliases" : {  
"admin" : { },  
"secutenant": {  
"filter" : {  
"or" : [  
{  
"terms" : { "@project" : ["secutenant", "usertenant"]}  
}  
]  
},  
"routing": "secutenant,usertenant"  
},  
"usertenant": {  
"filter" : {  
"terms" : { "@project" : ["usertenant"]}  
},  
"routing": "usertenant"  
}  
}  
}'

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/62aecf73-eb2c-4d88-88c6-9127a82b309e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/62aecf73-eb2c-4d88-88c6-9127a82b309e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:04am UTC](https://discuss.elastic.co/t/multi-routing-in-template-aliases/19620/2 "2017-07-06T01:04:24Z")

</div>


