# Can we create index template without mappings?

**URL:** <https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697>\
**Category:** Elasticsearch\
**Created:** [June 20, 2019, 1:31pm UTC](https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697 "2019-06-20T13:31:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeetu19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeetu19/32/42558_2.png) [@Jeetu19](https://discuss.elastic.co/u/Jeetu19)\
**Post date:** [June 20, 2019, 1:31pm UTC](https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697/1 "2019-06-20T13:31:04Z")

</div>

I dont know the types of field coming from log, so can we create template without mapping of field like below.

PUT \_template/test  
{  
"index\_patterns": "test\*",  
"settings": {  
"number\_of\_shards": 3,  
"number\_of\_replicas": 1  
}  
}

---

<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:** [June 20, 2019, 1:44pm UTC](https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697/2 "2019-06-20T13:44:29Z")

</div>

Yes you can.

---

<div class="post-metadata">

**Author:** ![Jeetu19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeetu19/32/42558_2.png) [@Jeetu19](https://discuss.elastic.co/u/Jeetu19)\
**Post date:** [June 21, 2019, 6:26am UTC](https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697/3 "2019-06-21T06:26:46Z")

</div>

thanks for superfast reply!!!  
Is there any drawbacks(any performance issue,slowness etc), by creating template with this method.

---

<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:** [June 21, 2019, 7:00am UTC](https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697/4 "2019-06-21T07:00:30Z")

</div>

Can't see any.

---

<div class="post-metadata">

**Author:** ![Jeetu19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeetu19/32/42558_2.png) [@Jeetu19](https://discuss.elastic.co/u/Jeetu19)\
**Post date:** [June 21, 2019, 7:25am UTC](https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697/5 "2019-06-21T07:25:06Z")

</div>

with below method.

PUT \_template/test  
{  
"index\_patterns": "test\*",  
"settings": {  
"number\_of\_shards": 3,  
"number\_of\_replicas": 1  
}  
}

---

<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:** [June 21, 2019, 7:44am UTC](https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697/6 "2019-06-21T07:44:11Z")

</div>

I meant that I "can't see any" problem.

---

<div class="post-metadata">

**Author:** ![Jeetu19](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeetu19/32/42558_2.png) [@Jeetu19](https://discuss.elastic.co/u/Jeetu19)\
**Post date:** [June 21, 2019, 10:14am UTC](https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697/7 "2019-06-21T10:14:44Z")

</div>

Thanks for 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:** [July 19, 2019, 10:14am UTC](https://discuss.elastic.co/t/can-we-create-index-template-without-mappings/186697/8 "2019-07-19T10:14:50Z")

</div>

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