# Set alias with filter from index template

**URL:** https://discuss.elastic.co/t/set-alias-with-filter-from-index-template/11008
**Category:** Elasticsearch
**Created:** [March 5, 2013, 1:38am UTC](https://discuss.elastic.co/t/set-alias-with-filter-from-index-template/11008 "2013-03-05T01:38:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![James\_Brook](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_brook/32/2453_2.png) [@James\_Brook](https://discuss.elastic.co/u/James_Brook)
#### Post date: [March 5, 2013, 1:38am UTC](https://discuss.elastic.co/t/set-alias-with-filter-from-index-template/11008/1 "2013-03-05T01:38:52Z")

</div>

I want to have an alias with a filter created by using an index template in  
the conf directory. I have got it working with a plain alias and no filters  
by specifying a string in the "index.aliases" property of "settings". Is it  
possible to create an alias with a filter in this way? I can't get it  
working.

My use case is that my indexes are named like this -\<YY.MM.\>  
and I want to give them an aliases for each document type that I expect.

Thanks  
James

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 5, 2013, 6:34am UTC](https://discuss.elastic.co/t/set-alias-with-filter-from-index-template/11008/2 "2013-03-05T06:34:07Z")

</div>

Not really the same but I think it could be relative to this one: [https://github.com/elasticsearch/elasticsearch/issues/1695](https://github.com/elasticsearch/elasticsearch/issues/1695)

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 mars 2013 à 02:38, James Brook [james\_brook@yahoo.co.uk](mailto:james_brook@yahoo.co.uk) a écrit :

I want to have an alias with a filter created by using an index template in the conf directory. I have got it working with a plain alias and no filters by specifying a string in the "index.aliases" property of "settings". Is it possible to create an alias with a filter in this way? I can't get it working.

My use case is that my indexes are named like this -\<YY.MM.\> and I want to give them an aliases for each document type that I expect.

## Thanks James

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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![James\_Brook](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_brook/32/2453_2.png) [@James\_Brook](https://discuss.elastic.co/u/James_Brook)
#### Post date: [March 7, 2013, 1:04am UTC](https://discuss.elastic.co/t/set-alias-with-filter-from-index-template/11008/3 "2013-03-07T01:04:29Z")

</div>

I had a go at adding full support for index aliases via index templates.  
It's handy because filters can be applied to indexes on creation and the  
template regex will make it easy to match indexes that have something  
variable like a date stamp in the name. Filters and routing aliases work as  
well.

> <https://github.com/elastic/elasticsearch/pull/2739>

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:47am UTC](https://discuss.elastic.co/t/set-alias-with-filter-from-index-template/11008/4 "2017-07-06T02:47:53Z")

</div>


