# Can Kibana recognize new index with different pattern automatically?

**URL:** <https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549>\
**Category:** Kibana\
**Created:** [June 29, 2015, 12:26pm UTC](https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549 "2015-06-29T12:26:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alpert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alpert/32/3500_2.png) [@alpert](https://discuss.elastic.co/u/alpert)\
**Post date:** [June 29, 2015, 12:26pm UTC](https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549/1 "2015-06-29T12:26:53Z")

</div>

I am creating indexes programmatically with different mappings. Is it possible that Kibana will recognize that new indexes automatically?

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [June 29, 2015, 3:33pm UTC](https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549/2 "2015-06-29T15:33:45Z")

</div>

You can use wildcards and date/time patterns in your index patterns. More on that here: [https://www.elastic.co/guide/en/kibana/current/settings.html](https://www.elastic.co/guide/en/kibana/current/settings.html)

---

<div class="post-metadata">

**Author:** ![alpert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alpert/32/3500_2.png) [@alpert](https://discuss.elastic.co/u/alpert)\
**Post date:** [June 30, 2015, 6:09am UTC](https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549/3 "2015-06-30T06:09:51Z")

</div>

Hi. Lets say I have 2 indexes index1 and index2 that have common fields. When I created an index pattern like index\* and try to create a visualization how can I only show data from index1?

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [June 30, 2015, 1:21pm UTC](https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549/4 "2015-06-30T13:21:25Z")

</div>

You cannot - once you've set the index pattern, it will search all indexes in that pattern. However, you can define multiple index patterns, even if they overlap, and run queries against them directly, for instance: "index1", "index2", and "index\*" can all be index patterns you add.

---

<div class="post-metadata">

**Author:** ![alpert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alpert/32/3500_2.png) [@alpert](https://discuss.elastic.co/u/alpert)\
**Post date:** [June 30, 2015, 7:32pm UTC](https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549/5 "2015-06-30T19:32:56Z")

</div>

Ok. Thanks. But is it possible to create an index pattern programmatically? From an api etc. I want to create index pattern for my index from my java program

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [June 30, 2015, 8:26pm UTC](https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549/6 "2015-06-30T20:26:10Z")

</div>

Got it - no, unfortunately not at this time. But it's a request we've heard before and are tracking, so please feel free to +1 and expand on your use case! [https://github.com/elastic/kibana/issues/3709](https://github.com/elastic/kibana/issues/3709)

---

<div class="post-metadata">

**Author:** ![alpert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alpert/32/3500_2.png) [@alpert](https://discuss.elastic.co/u/alpert)\
**Post date:** [June 30, 2015, 9:22pm UTC](https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549/7 "2015-06-30T21:22:24Z")

</div>

Thanks for your help and quick replies. I will just try to fix that problem by manually creating fields json for index pattern and putting it to index-pattern in .kibana index.

---

<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:17pm UTC](https://discuss.elastic.co/t/can-kibana-recognize-new-index-with-different-pattern-automatically/24549/8 "2017-07-06T14:17:16Z")

</div>


