# Date Index + Alias question

**URL:** <https://discuss.elastic.co/t/date-index-alias-question/109978>\
**Category:** Elasticsearch\
**Created:** [December 1, 2017, 7:22pm UTC](https://discuss.elastic.co/t/date-index-alias-question/109978 "2017-12-01T19:22:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![beng](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@beng](https://discuss.elastic.co/u/beng)\
**Post date:** [December 1, 2017, 7:22pm UTC](https://discuss.elastic.co/t/date-index-alias-question/109978/1 "2017-12-01T19:22:07Z")

</div>

We're currently using a date index name pipeline to ingest documents into index based on date ([https://www.elastic.co/guide/en/elasticsearch/reference/current/date-index-name-processor.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/date-index-name-processor.html)). We currently have an alias pointed at index-\* to support searching across all of our indices.

When the new index index-12-01-2017 was created, the pipeline did not add it to the alias (dumb oversight on my part)... is there a way to have a new index created added to the existing alias?

I found [https://stackoverflow.com/questions/37690083/elasticsearch-alias-auto-update-for-rolling-index](https://stackoverflow.com/questions/37690083/elasticsearch-alias-auto-update-for-rolling-index) and tried adding the alias portion to our template, but upon testing it did not add the new index to the existing alias.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 1, 2017, 8:58pm UTC](https://discuss.elastic.co/t/date-index-alias-question/109978/2 "2017-12-01T20:58:19Z")

</div>

Which version of Elasticsearch are you on?

---

<div class="post-metadata">

**Author:** ![beng](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@beng](https://discuss.elastic.co/u/beng)\
**Post date:** [December 1, 2017, 9:09pm UTC](https://discuss.elastic.co/t/date-index-alias-question/109978/3 "2017-12-01T21:09:40Z")

</div>

@Christian_Dahlqvist We are currently on 5.6.3

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 2, 2017, 10:52am UTC](https://discuss.elastic.co/t/date-index-alias-question/109978/4 "2017-12-02T10:52:28Z")

</div>

In older releases, Kibana used to make a call to the field stats API to identify exactly which indices matching the index pattern that could hold data relevant to the query and then send the query just to these. In recent versions, sending queries to all shards matching an index pattern has been made a lot more efficient, so Kibana no longer performs this extra step.

I am therefore not sure if you really need an alias for all indices that can be read. I would try sending the query directly towards and index pattern that matches what you want to query, e.g. `index-*`, and see how that performs.

---

<div class="post-metadata">

**Author:** ![beng](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@beng](https://discuss.elastic.co/u/beng)\
**Post date:** [December 2, 2017, 10:31pm UTC](https://discuss.elastic.co/t/date-index-alias-question/109978/5 "2017-12-02T22:31:43Z")

</div>

@Christian_Dahlqvist awesome, thanks for the help!

---

<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:** [December 30, 2017, 10:32pm UTC](https://discuss.elastic.co/t/date-index-alias-question/109978/6 "2017-12-30T22:32:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
