# What's the differece between index pattern and index template

**URL:** <https://discuss.elastic.co/t/whats-the-differece-between-index-pattern-and-index-template/54948>\
**Category:** Kibana\
**Created:** [July 7, 2016, 1:32pm UTC](https://discuss.elastic.co/t/whats-the-differece-between-index-pattern-and-index-template/54948 "2016-07-07T13:32:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fjiang212](https://avatars.discourse-cdn.com/v4/letter/f/76d3ee/32.png) [@fjiang212](https://discuss.elastic.co/u/fjiang212)\
**Post date:** [July 7, 2016, 1:32pm UTC](https://discuss.elastic.co/t/whats-the-differece-between-index-pattern-and-index-template/54948/1 "2016-07-07T13:32:08Z")

</div>

I am a little confused about index pattern in kibana and index template in the elasticsearch, could someone explain what is the difference between these two ? Should we load the index template first before creating index pattern in kibana?

Thanks!

---

<div class="post-metadata">

**Author:** ![BigFunger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigfunger/32/7323_2.png) [@BigFunger](https://discuss.elastic.co/u/BigFunger)\
**Post date:** [July 7, 2016, 2:29pm UTC](https://discuss.elastic.co/t/whats-the-differece-between-index-pattern-and-index-template/54948/2 "2016-07-07T14:29:16Z")

</div>

From [Elasticsearch Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/_basic_concepts.html#_index)

> An **index** is a collection of documents that have somewhat similar characteristics. For example, you can have an index for customer data, another index for a product catalog, and yet another index for order data. An index is identified by a name (that must be all lowercase) and this name is used to refer to the index when performing indexing, search, update, and delete operations against the documents in it.

* * *

From [Elasticsearch Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html)

> **Index templates** allow you to define templates that will automatically be  
> applied when new indices are created. The templates include both settings and  
> mappings, and a simple pattern template that controls whether the template  
> should be applied to the new index.

* * *

From [Kibana Documentation](https://www.elastic.co/guide/en/kibana/4.5/settings.html#set-default-pattern)

> An **index pattern** identifies one or more Elasticsearch indices that you want to explore with Kibana. Kibana looks for  
> index names that match the specified pattern.  
> An asterisk (\*) in the pattern matches zero or more characters. For example, the pattern myindex-\* matches all  
> indices whose names start with myindex-, such as myindex-1 and myindex-2.An index pattern can also simply be the name of a single index.

* * *

In other words, **Index** and **Index Template** are Elasticsearch constructs. **Index Pattern** is a Kibana construct.

An **Index** is where the actual data is stored, and an **Index Template** gives Elasticsearch some rules about how to create indexes. All this pertains to how new data is _stored_.

**Index Pattern** is the construct that tells Kibana how to find data in indexes in Elasticsearch. This pertains to how existing data is _accessed_ (In the context of Kibana).

---

<div class="post-metadata">

**Author:** ![fjiang212](https://avatars.discourse-cdn.com/v4/letter/f/76d3ee/32.png) [@fjiang212](https://discuss.elastic.co/u/fjiang212)\
**Post date:** [July 7, 2016, 4:51pm UTC](https://discuss.elastic.co/t/whats-the-differece-between-index-pattern-and-index-template/54948/3 "2016-07-07T16:51:46Z")

</div>

Thanks for detail explanation!

---

<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:47pm UTC](https://discuss.elastic.co/t/whats-the-differece-between-index-pattern-and-index-template/54948/4 "2017-07-06T13:47:56Z")

</div>


