# Update of \_ttl not working with doc option

**URL:** <https://discuss.elastic.co/t/update-of--ttl-not-working-with-doc-option/23904>\
**Category:** Elasticsearch\
**Created:** [June 18, 2015, 12:12pm UTC](https://discuss.elastic.co/t/update-of--ttl-not-working-with-doc-option/23904 "2015-06-18T12:12:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Bolis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomas_bolis/32/700_2.png) [@Thomas\_Bolis](https://discuss.elastic.co/u/Thomas_Bolis)\
**Post date:** [June 18, 2015, 12:12pm UTC](https://discuss.elastic.co/t/update-of--ttl-not-working-with-doc-option/23904/1 "2015-06-18T12:12:25Z")

</div>

Hi I'm trying to update the ttl of a document with the following way but it seems that it is not getting updated:

> POST /my\_index/my\_type/AU4Gd1DVbqjanfsolMgP/\_update  
> {  
> "doc": {  
> "\_ttl": 60000  
> },  
> "doc\_as\_upsert": true  
> }

With the script way it is getting updated normally.. What is the problem? does anyone know? thanks

related stackoverflow question: [link](http://stackoverflow.com/questions/30915098/update-of-ttl-not-working-with-doc-option)

---

<div class="post-metadata">

**Author:** ![rkonda](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rkonda](https://discuss.elastic.co/u/rkonda)\
**Post date:** [April 14, 2016, 3:37am UTC](https://discuss.elastic.co/t/update-of--ttl-not-working-with-doc-option/23904/2 "2016-04-14T03:37:12Z")

</div>

Does anyone have an answer to 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:** [July 5, 2017, 10:59pm UTC](https://discuss.elastic.co/t/update-of--ttl-not-working-with-doc-option/23904/3 "2017-07-05T22:59:25Z")

</div>


