# Update timestamp of logs already indexed into ES

**URL:** https://discuss.elastic.co/t/update-timestamp-of-logs-already-indexed-into-es/195656
**Category:** Elasticsearch
**Created:** [August 18, 2019, 4:10pm UTC](https://discuss.elastic.co/t/update-timestamp-of-logs-already-indexed-into-es/195656 "2019-08-18T16:10:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Anwar\_Ahmed\_Sayed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anwar_ahmed_sayed/32/47708_2.png) [@Anwar\_Ahmed\_Sayed](https://discuss.elastic.co/u/Anwar_Ahmed_Sayed)
#### Post date: [August 18, 2019, 4:10pm UTC](https://discuss.elastic.co/t/update-timestamp-of-logs-already-indexed-into-es/195656/1 "2019-08-18T16:10:59Z")

</div>

hi,  
wondering a best approach to update timestamp of logs already indexed into ES.  
the new value should be \_timestamp = field1.value + field3.value.

@timestamp = August 18th 2019, 11:29:58.271  
field1\_time = August 17th 2019, 10:49:57.000  
field2\_value = 10 -\>min

need to update @timestamp = field1\_time + field2\_value  
ie; @timestamp = August 17th 2019, 10:49:57.000 + 10  
@timestamp = August 17th 2019, 10:59:57.000

thanks in advance

---

<div class="post-metadata">

### Author: ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)
#### Post date: [August 18, 2019, 4:26pm UTC](https://discuss.elastic.co/t/update-timestamp-of-logs-already-indexed-into-es/195656/2 "2019-08-18T16:26:09Z")

</div>

You can use [Painless Script](https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-walkthrough.html).

---

<div class="post-metadata">

### Author: ![Anwar\_Ahmed\_Sayed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anwar_ahmed_sayed/32/47708_2.png) [@Anwar\_Ahmed\_Sayed](https://discuss.elastic.co/u/Anwar_Ahmed_Sayed)
#### Post date: [August 18, 2019, 5:56pm UTC](https://discuss.elastic.co/t/update-timestamp-of-logs-already-indexed-into-es/195656/3 "2019-08-18T17:56:07Z")

</div>

thx for the reply. i am new to this. appreciate if you would shed more light on how to achieve this.

---

<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: [September 15, 2019, 5:56pm UTC](https://discuss.elastic.co/t/update-timestamp-of-logs-already-indexed-into-es/195656/4 "2019-09-15T17:56:16Z")

</div>

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