# TTL for nested objects

**URL:** <https://discuss.elastic.co/t/ttl-for-nested-objects/12874>\
**Category:** Elasticsearch\
**Created:** [July 21, 2013, 1:15pm UTC](https://discuss.elastic.co/t/ttl-for-nested-objects/12874 "2013-07-21T13:15:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oreno](https://avatars.discourse-cdn.com/v4/letter/o/b4bc9f/32.png) [@oreno](https://discuss.elastic.co/u/oreno)\
**Post date:** [July 21, 2013, 1:15pm UTC](https://discuss.elastic.co/t/ttl-for-nested-objects/12874/1 "2013-07-21T13:15:04Z")

</div>

Hi,  
Does anyone know if there's an option to declare TTL time for nested objects?  
Meaning that the nested object will be deleted, but the parent doc will still remain.

Thanks in advanced,

oren

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [July 22, 2013, 9:57am UTC](https://discuss.elastic.co/t/ttl-for-nested-objects/12874/2 "2013-07-22T09:57:55Z")

</div>

No, this isn't possible at the moment. A TTL can only be specified for the  
complete document, but not for parts of a document. Even though a nested  
inner object is an individual Lucene document under the hood, it is still  
part of the whole (root) document and it is tightly coupled to that.

If a ttl for you nested objects is important, perhaps you can use the  
parent / child support or the Terms filter's terms lookup support instead  
of the nested support.

On 21 July 2013 15:15, oreno [oreno@exelate.com](mailto:oreno@exelate.com) wrote:

> Hi,  
> Does anyone know if there's an option to declare TTL time for nested  
> objects?  
> Meaning that the nested object will be deleted, but the parent doc will  
> still remain.
> 
> Thanks in advanced,
> 
> oren
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/TTL-for-nested-objects-tp4038426.html](http://elasticsearch-users.115913.n3.nabble.com/TTL-for-nested-objects-tp4038426.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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).

--  
Met vriendelijke groet,

Martijn van Groningen

--  
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:25am UTC](https://discuss.elastic.co/t/ttl-for-nested-objects/12874/3 "2017-07-06T02:25:14Z")

</div>

Closed on July 6, 2017, 2:25am UTC


