# Keep the current \_timestamp in UPDATE document request

**URL:** https://discuss.elastic.co/t/keep-the-current--timestamp-in-update-document-request/9069
**Category:** Elasticsearch
**Created:** [September 19, 2012, 7:57pm UTC](https://discuss.elastic.co/t/keep-the-current--timestamp-in-update-document-request/9069 "2012-09-19T19:57:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Felipe\_Hummel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felipe_hummel/32/1263_2.png) [@Felipe\_Hummel](https://discuss.elastic.co/u/Felipe_Hummel)
#### Post date: [September 19, 2012, 7:57pm UTC](https://discuss.elastic.co/t/keep-the-current--timestamp-in-update-document-request/9069/1 "2012-09-19T19:57:21Z")

</div>

How can I keep the same \_timestamp value in an update request?  
I don't want it to change because of an update in the document.

I've tried something like this in the update script:

ctx.\_timestamp = ctx.\_timestamp

But it doesn't work (can't find ctx.\_timestamp). Is there a way to access  
the current \_timestamp to set it to ctx.\_timestamp?

Thanks

Felipe Hummel

--

---

<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, 3:12am UTC](https://discuss.elastic.co/t/keep-the-current--timestamp-in-update-document-request/9069/2 "2017-07-06T03:12:13Z")

</div>


