# Marking a timestamp field across a wildcard index name

**URL:** <https://discuss.elastic.co/t/marking-a-timestamp-field-across-a-wildcard-index-name/158807>\
**Category:** Kibana\
**Created:** [November 29, 2018, 6:17pm UTC](https://discuss.elastic.co/t/marking-a-timestamp-field-across-a-wildcard-index-name/158807 "2018-11-29T18:17:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![awerner](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@awerner](https://discuss.elastic.co/u/awerner)\
**Post date:** [November 29, 2018, 6:17pm UTC](https://discuss.elastic.co/t/marking-a-timestamp-field-across-a-wildcard-index-name/158807/1 "2018-11-29T18:17:34Z")

</div>

I've just started using ElasticSearch/Kibana, and I've run into a hopefully simple issue. The records I'm submitting (via JSON/REST) contain a field named "timestamp", which is a unix time integer. Apparently I had to inform Kibana that this was a timestamp field with a command like this:  
PUT cxtesterrors  
{  
"mappings": {  
"\_doc": {  
"properties": {  
"timestamp": {  
"type": "date",  
"format": "epoch\_second"  
}  
}  
}  
}  
}

That worked fine. But after reading some more, I realized that I should have one index name for every day, so, for instance, cxtesterrors\_2018\_11\_28. So I set the time format for cxtesterrors\_2018\_11\_28 yesterday, and that worked fine, but now the date is 11/29 instead of 11/28, and I can't see any new records I'm submitting, presumably because the timestamp field for cxtesterrors\_2018\_11\_29 isn't properly set up. I tried to do that PUT on a wildcard (cxtesterrors\_\*) and that didn't work. What's the solution? (I hope it's not having to set up a CRON job to do a PUT for every day's records forever...)

thanks!

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [November 29, 2018, 8:46pm UTC](https://discuss.elastic.co/t/marking-a-timestamp-field-across-a-wildcard-index-name/158807/2 "2018-11-29T20:46:46Z")

</div>

This question is probably better handled in the Elasticsearch forums since it's regarding Elasticsearch mappings, but I'm pretty sure what you're looking for is here: [https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-templates.html)

---

<div class="post-metadata">

**Author:** ![awerner](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@awerner](https://discuss.elastic.co/u/awerner)\
**Post date:** [November 29, 2018, 9:57pm UTC](https://discuss.elastic.co/t/marking-a-timestamp-field-across-a-wildcard-index-name/158807/3 "2018-11-29T21:57:34Z")

</div>

@lukas: looking at that page, it still seems like that requires doing a PUT to a specific index. Won't I just run into the same problem, where I set the dynamic template for cxtesterrors\_2018\_11\_28 but that won't set it for cxtesterrors\_2018\_11\_29?

(Another solution to my problem might be to submit my timestamps in some format which will always, automatically, be interpreted as a timestamp. Is that possible? Using ISO standard time strings?)

thanks again!

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [November 29, 2018, 11:23pm UTC](https://discuss.elastic.co/t/marking-a-timestamp-field-across-a-wildcard-index-name/158807/4 "2018-11-29T23:23:42Z")

</div>

Sorry I sent you the wrong link, I meant to send this:

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

---

<div class="post-metadata">

**Author:** ![awerner](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@awerner](https://discuss.elastic.co/u/awerner)\
**Post date:** [November 29, 2018, 11:35pm UTC](https://discuss.elastic.co/t/marking-a-timestamp-field-across-a-wildcard-index-name/158807/5 "2018-11-29T23:35:24Z")

</div>

Yes, that looks like what I need, thanks!

---

<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:** [December 27, 2018, 11:35pm UTC](https://discuss.elastic.co/t/marking-a-timestamp-field-across-a-wildcard-index-name/158807/6 "2018-12-27T23:35:30Z")

</div>

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