# Define Index mapping for time based indexes my\_index-%{YYYY-MM-DD}

**URL:** <https://discuss.elastic.co/t/define-index-mapping-for-time-based-indexes-my-index-yyyy-mm-dd/162898>\
**Category:** Elasticsearch\
**Created:** [January 4, 2019, 5:15am UTC](https://discuss.elastic.co/t/define-index-mapping-for-time-based-indexes-my-index-yyyy-mm-dd/162898 "2019-01-04T05:15:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BHAVIK\_CHITRODA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavik_chitroda/32/41947_2.png) [@BHAVIK\_CHITRODA](https://discuss.elastic.co/u/BHAVIK_CHITRODA)\
**Post date:** [January 4, 2019, 5:15am UTC](https://discuss.elastic.co/t/define-index-mapping-for-time-based-indexes-my-index-yyyy-mm-dd/162898/1 "2019-01-04T05:15:39Z")

</div>

Is there a way to use define mapping for an index that will be used for all the subsequent indexes with different time stamps?

I am sending logs from Logstash to ES using elasticsearch plugin. In the index configuration I am specifying my\_index-%{YYYY-MM-DD}.

**When I run this on Kibana:**

PUT my\_index-\*  
{  
"mappings": {  
"\_doc": {  
"dynamic": true,  
"properties": {  
"ip\_addr": {  
"type": "ip"  
}  
}  
}  
}  
}

**I get output error as:**  
{  
"type": "illegal\_state\_exception",  
"reason": "There are no external requests known to support wildcards that don't support replacing their indices"  
}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 4, 2019, 5:25am UTC](https://discuss.elastic.co/t/define-index-mapping-for-time-based-indexes-my-index-yyyy-mm-dd/162898/2 "2019-01-04T05:25:28Z")

</div>

Sure are - [https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html)

---

<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:** [February 1, 2019, 5:25am UTC](https://discuss.elastic.co/t/define-index-mapping-for-time-based-indexes-my-index-yyyy-mm-dd/162898/3 "2019-02-01T05:25:29Z")

</div>

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