# Index pattern with same start name

**URL:** https://discuss.elastic.co/t/index-pattern-with-same-start-name/181516
**Category:** Kibana
**Created:** [May 17, 2019, 6:09am UTC](https://discuss.elastic.co/t/index-pattern-with-same-start-name/181516 "2019-05-17T06:09:20Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![gabriel\_tessier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_tessier/32/27911_2.png) [@gabriel\_tessier](https://discuss.elastic.co/u/gabriel_tessier)
#### Post date: [May 17, 2019, 6:09am UTC](https://discuss.elastic.co/t/index-pattern-with-same-start-name/181516/1 "2019-05-17T06:09:20Z")

</div>

Hi,

Is there a way to define different index pattern for index like this:  
app\_event\_20190517  
app\_event\_special\_20190517

The problem is if I set an index pattern app\_event\_\* the second index is included.  
I want to have one index pattern for app\_event\_(date) and one for app\_event\_special\_(date)

Now I'm using app\_event\_2\* (but I'll have a problem in 3000 😅)  
is there a way to define an index pattern with a regexp or anything else to tell that the \* is a date? something like my\_index\_(date)?

Thanks for any help or suggestion

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [May 17, 2019, 3:56pm UTC](https://discuss.elastic.co/t/index-pattern-with-same-start-name/181516/2 "2019-05-17T15:56:39Z")

</div>

Ha, I had to laugh about the year 3000. I think your solution is fine. A couple more options off the top of my head.

Rename `app_event_special`

Use an alias to manage the list of indices to include, and use that alias for your index pattern. With something like Index Lifecycle Management Management (ILM), you should be able to automate the inclusion of the indices into the alias. Before ILM you would use something like Curator to accomplish this.

---

<div class="post-metadata">

### Author: ![gabriel\_tessier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_tessier/32/27911_2.png) [@gabriel\_tessier](https://discuss.elastic.co/u/gabriel_tessier)
#### Post date: [May 20, 2019, 3:49am UTC](https://discuss.elastic.co/t/index-pattern-with-same-start-name/181516/3 "2019-05-20T03:49:36Z")

</div>

Thanks for the reply.

Rename an index is too much as I have an app behind that have logic and the index have some model linked etc... and in this case it's only to have the index in Kibana to build visualize.

I also thought about setting an alias but I already have alias on all indices as I follow the good practice to reindex + some alias for similar index search etc... I thought that this case is better to be handled in Kibana as this alias will be only for use in Kibana.

I also notice that even if we try to follow some good practice the problem with "my\_index\_\*", with \* for a date time string the date format can take any format so the index can have something like 20190520, 2019-05-20, 2019\_05\_20\_10\_15 etc...

We need one date format to rule them all, one date format to search them, one date format to bring them all and in Kibana bind them.

Having a rule in the pattern can help to prevent some fancy date format.

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [May 20, 2019, 3:06pm UTC](https://discuss.elastic.co/t/index-pattern-with-same-start-name/181516/4 "2019-05-20T15:06:48Z")

</div>

Gotcha, in that case, `app_event_2*` as the index pattern in Kibana is going to be your best option.

---

<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: [June 17, 2019, 3:06pm UTC](https://discuss.elastic.co/t/index-pattern-with-same-start-name/181516/5 "2019-06-17T15:06:50Z")

</div>

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