# Nest 5.5 es 5.6 ttl

**URL:** <https://discuss.elastic.co/t/nest-5-5-es-5-6-ttl/100687>\
**Category:** Elasticsearch\
**Created:** [September 15, 2017, 12:56pm UTC](https://discuss.elastic.co/t/nest-5-5-es-5-6-ttl/100687 "2017-09-15T12:56:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![czaban](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/czaban/32/22146_2.png) [@czaban](https://discuss.elastic.co/u/czaban)\
**Post date:** [September 15, 2017, 12:56pm UTC](https://discuss.elastic.co/t/nest-5-5-es-5-6-ttl/100687/1 "2017-09-15T12:56:19Z")

</div>

I've been working with ES 2.6 and the index like this one:

var response = MyElasticClient.Index(myObject,  
i =\> i.Type("mytype").Ttl(new Time(TimeSpan.FromDays(31))));

now stop working and the error goes like follow:

parse\_exception Reason: "failed to parse setting [ttl] with value [4.43w] as a time value: unit is missing or unrecognized"

How to set the TTL for the object?

Best regards  
Czaban

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 15, 2017, 1:03pm UTC](https://discuss.elastic.co/t/nest-5-5-es-5-6-ttl/100687/2 "2017-09-15T13:03:28Z")

</div>

TTL functionality was deprecated in Elasticsearch 2.x and [removed in Elasticsearch 5.x](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/breaking_50_mapping_changes.html#_literal __timestamp_literal_and_literal__ ttl_literal).

---

<div class="post-metadata">

**Author:** ![czaban](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/czaban/32/22146_2.png) [@czaban](https://discuss.elastic.co/u/czaban)\
**Post date:** [September 15, 2017, 6:41pm UTC](https://discuss.elastic.co/t/nest-5-5-es-5-6-ttl/100687/3 "2017-09-15T18:41:48Z")

</div>

It was fundamental to us - is there any other mechanism that determines that an object is to be removed after a certain time?

---

<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:** [October 13, 2017, 6:41pm UTC](https://discuss.elastic.co/t/nest-5-5-es-5-6-ttl/100687/4 "2017-10-13T18:41:49Z")

</div>

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