# Different TTL Configuration for Parent/Child

**URL:** <https://discuss.elastic.co/t/different-ttl-configuration-for-parent-child/11045>\
**Category:** Elasticsearch\
**Created:** [March 7, 2013, 3:52am UTC](https://discuss.elastic.co/t/different-ttl-configuration-for-parent-child/11045 "2013-03-07T03:52:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TeeTim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teetim/32/2370_2.png) [@TeeTim](https://discuss.elastic.co/u/TeeTim)\
**Post date:** [March 7, 2013, 3:52am UTC](https://discuss.elastic.co/t/different-ttl-configuration-for-parent-child/11045/1 "2013-03-07T03:52:16Z")

</div>

For a single index with parent and child document mappings, does ES support  
different TTL settings (enabled), via the Put Mapping API? In other words,  
can a parent document have a different TTL setting than it's child  
document? Or can only the parent document be configured with the TTL  
setting?

Thanks in advance.

Tim

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [March 8, 2013, 3:07pm UTC](https://discuss.elastic.co/t/different-ttl-configuration-for-parent-child/11045/2 "2013-03-08T15:07:25Z")

</div>

Hello Tim,

Yes, you can put different TTLs, as parents and children are different  
documents with different mappings. You can test that with something like:

> <https://gist.github.com/radu-gheorghe/5117021>

But for that to work, you need to set indices.ttl.interval to something  
like "1s" in your configuration and restart ES. Otherwise, \_ttl will be  
applied every 60s which will invalidate the test 🙂

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Thu, Mar 7, 2013 at 5:52 AM, Tim Sheridan [tim.sheridan@me.com](mailto:tim.sheridan@me.com) wrote:

> For a single index with parent and child document mappings, does ES  
> support different TTL settings (enabled), via the Put Mapping API? In other  
> words, can a parent document have a different TTL setting than it's child  
> document? Or can only the parent document be configured with the TTL  
> setting?
> 
> Thanks in advance.
> 
> Tim
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:47am UTC](https://discuss.elastic.co/t/different-ttl-configuration-for-parent-child/11045/3 "2017-07-06T02:47:30Z")

</div>


