# Parent child mapping & ttl on parent

**URL:** <https://discuss.elastic.co/t/parent-child-mapping-ttl-on-parent/7683>\
**Category:** Elasticsearch\
**Created:** [May 14, 2012, 1:16pm UTC](https://discuss.elastic.co/t/parent-child-mapping-ttl-on-parent/7683 "2012-05-14T13:16:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wojciech\_Durczynski](https://avatars.discourse-cdn.com/v4/letter/w/fbc32d/32.png) [@Wojciech\_Durczynski](https://discuss.elastic.co/u/Wojciech_Durczynski)\
**Post date:** [May 14, 2012, 1:16pm UTC](https://discuss.elastic.co/t/parent-child-mapping-ttl-on-parent/7683/1 "2012-05-14T13:16:51Z")

</div>

Hello.

Here is a gist with case I'm interested in:

> <https://gist.github.com/Avatah/2693858>

I'd like child documents to be deleted together with parent document when  
ttl elapsed.  
If this is not possible than maybe at least \_parent field in children  
documents could be cleared when parent document is erased?

Regards.  
Wojciech Durczyński

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 15, 2012, 8:42pm UTC](https://discuss.elastic.co/t/parent-child-mapping-ttl-on-parent/7683/2 "2012-05-15T20:42:38Z")

</div>

It should be possible, can you open an issue?

On Mon, May 14, 2012 at 4:16 PM, Wojciech Durczyński \<  
[wojciech.durczynski@comarch.com](mailto:wojciech.durczynski@comarch.com)\> wrote:

> Hello.
> 
> Here is a gist with case I'm interested in:  
> [ElasticSearch parent child mapping & ttl on parent · GitHub](https://gist.github.com/2693858)
> 
> I'd like child documents to be deleted together with parent document when  
> ttl elapsed.  
> If this is not possible than maybe at least \_parent field in children  
> documents could be cleared when parent document is erased?
> 
> Regards.  
> Wojciech Durczyński

---

<div class="post-metadata">

**Author:** ![Wojciech\_Durczynski](https://avatars.discourse-cdn.com/v4/letter/w/fbc32d/32.png) [@Wojciech\_Durczynski](https://discuss.elastic.co/u/Wojciech_Durczynski)\
**Post date:** [May 16, 2012, 8:36am UTC](https://discuss.elastic.co/t/parent-child-mapping-ttl-on-parent/7683/3 "2012-05-16T08:36:44Z")

</div>

Issue created:

> <https://github.com/elastic/elasticsearch/issues/1954>
>
> Discussed here:
> https://groups.google.com/forum/?fromgroups#!topic/elasticsearch…/nfpTXJFePhA
> Child documents should be deleted when parent documents is deleted. Especially if it's deleted by ttl.

W dniu wtorek, 15 maja 2012 22:42:38 UTC+2 użytkownik kimchy napisał:

> It should be possible, can you open an issue?
> 
> On Mon, May 14, 2012 at 4:16 PM, Wojciech Durczyński \<  
> [wojciech.durczynski@comarch.com](mailto:wojciech.durczynski@comarch.com)\> wrote:
> 
> > Hello.
> > 
> > Here is a gist with case I'm interested in:  
> > [ElasticSearch parent child mapping & ttl on parent · GitHub](https://gist.github.com/2693858)
> > 
> > I'd like child documents to be deleted together with parent document when  
> > ttl elapsed.  
> > If this is not possible than maybe at least \_parent field in children  
> > documents could be cleared when parent document is erased?
> > 
> > Regards.  
> > Wojciech Durczyński

---

<div class="post-metadata">

**Author:** ![pcdinh](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@pcdinh](https://discuss.elastic.co/u/pcdinh)\
**Post date:** [June 7, 2012, 7:05pm UTC](https://discuss.elastic.co/t/parent-child-mapping-ttl-on-parent/7683/4 "2012-06-07T19:05:50Z")

</div>

Hi,

Is there any update on this issue?

On Wednesday, May 16, 2012 3:36:44 PM UTC+7, Wojciech Durczyński wrote:

> Issue created:
> 
> [Delete child documents when parent is deleted. · Issue #1954 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1954)
> 
> W dniu wtorek, 15 maja 2012 22:42:38 UTC+2 użytkownik kimchy napisał:
> 
> > It should be possible, can you open an issue?
> > 
> > On Mon, May 14, 2012 at 4:16 PM, Wojciech Durczyński  
> > [wojciech.durczynski@com](mailto:wojciech.durczynski@com) wrote:
> > 
> > > Hello.
> > > 
> > > Here is a gist with case I'm interested in:  
> > > [ElasticSearch parent child mapping & ttl on parent · GitHub](https://gist.github.com/2693858)
> > > 
> > > I'd like child documents to be deleted together with parent document  
> > > when ttl elapsed.  
> > > If this is not possible than maybe at least \_parent field in children  
> > > documents could be cleared when parent document is erased?
> > > 
> > > Regards.  
> > > Wojciech Durczyński

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 10, 2012, 9:38pm UTC](https://discuss.elastic.co/t/parent-child-mapping-ttl-on-parent/7683/5 "2012-06-10T21:38:46Z")

</div>

You can follow the issue.

On Thu, Jun 7, 2012 at 9:05 PM, pcdinh [pcdinh@gmail.com](mailto:pcdinh@gmail.com) wrote:

> Hi,
> 
> Is there any update on this issue?
> 
> On Wednesday, May 16, 2012 3:36:44 PM UTC+7, Wojciech Durczyński wrote:
> 
> > Issue created:
> > 
> > [https://github.com/\*\*elasticsearch/elasticsearch/\*\*issues/1954](https://github.com/ **elasticsearch/elasticsearch/** issues/1954)[https://github.com/elasticsearch/elasticsearch/issues/1954](https://github.com/elasticsearch/elasticsearch/issues/1954)
> > 
> > W dniu wtorek, 15 maja 2012 22:42:38 UTC+2 użytkownik kimchy napisał:
> > 
> > > It should be possible, can you open an issue?
> > > 
> > > On Mon, May 14, 2012 at 4:16 PM, Wojciech Durczyński  
> > > [wojciech.durczynski@com](mailto:wojciech.durczynski@com) wrote:
> > > 
> > > > Hello.
> > > > 
> > > > Here is a gist with case I'm interested in:  
> > > > [https://gist.github.com/\*\*2693858](https://gist.github.com/**2693858) [https://gist.github.com/2693858](https://gist.github.com/2693858)
> > > > 
> > > > I'd like child documents to be deleted together with parent document  
> > > > when ttl elapsed.  
> > > > If this is not possible than maybe at least \_parent field in children  
> > > > documents could be cleared when parent document is erased?
> > > > 
> > > > Regards.  
> > > > Wojciech Durczyński

---

<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:24am UTC](https://discuss.elastic.co/t/parent-child-mapping-ttl-on-parent/7683/6 "2017-07-06T03:24:59Z")

</div>


