# Problem with "Has Child Filter"

**URL:** https://discuss.elastic.co/t/problem-with-has-child-filter/6840
**Category:** Elasticsearch
**Created:** [February 29, 2012, 3:47pm UTC](https://discuss.elastic.co/t/problem-with-has-child-filter/6840 "2012-02-29T15:47:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Chris\_2](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@Chris\_2](https://discuss.elastic.co/u/Chris_2)
#### Post date: [February 29, 2012, 3:47pm UTC](https://discuss.elastic.co/t/problem-with-has-child-filter/6840/1 "2012-02-29T15:47:43Z")

</div>

Hello,

I'm trying to do an index with three levels : parent, child and  
"child of child".  
But i always have these failures when i post a query :

"QueryPhaseExecutionException[[parent\_child][1]:  
query[filtered(name:auchan)-\>child\_filter[department/store]  
(filtered(filtered(name:toys)-\>child\_filter[product/department]  
(filtered(trademark:tiger)-\>FilterCacheFilterWrapper(\_type:product)))-

> FilterCacheFilterWrapper(\_type:department))],from[0],size[10]: Query  
> Failed [Failed to execute child query [filtered(filtered(name:toys)-  
> child\_filter[product/department](filtered(trademark:tiger)-  
> FilterCacheFilterWrapper(\_type:product)))-  
> FilterCacheFilterWrapper(\_type:department)]]]; nested: "

I put my curl recreation here : [Elasticsearch 0.18.6 : My example of "parent child" · GitHub](https://gist.github.com/1941432)

1- a file to create the index : "parent child" mapping  
2- a file to index the data : "parent child" data  
3- a file to query the index : "parent child" query

Thank you in advance.

---

<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: [March 1, 2012, 12:24pm UTC](https://discuss.elastic.co/t/problem-with-has-child-filter/6840/2 "2012-03-01T12:24:28Z")

</div>

Heya,

Its a problem with multi level parent/child mapping implementation. Opened an issue: [Multi level parent/child mapping and search fails · Issue #1751 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1751).

-shay.banon

On Wednesday, February 29, 2012 at 5:47 PM, Chris wrote:

> Hello,
> 
> I'm trying to do an index with three levels : parent, child and  
> "child of child".  
> But i always have these failures when i post a query :
> 
> "QueryPhaseExecutionException[[parent\_child][1]:  
> query[filtered(name:auchan)-\>child\_filter[department/store]  
> (filtered(filtered(name:toys)-\>child\_filter[product/department]  
> (filtered(trademark:tiger)-\>FilterCacheFilterWrapper(\_type:product)))-
> 
> > FilterCacheFilterWrapper(\_type:department))],from[0],size[10]: Query
> 
> Failed [Failed to execute child query [filtered(filtered(name:toys)-
> 
> > child\_filter[product/department](filtered(trademark:tiger)-  
> > FilterCacheFilterWrapper(\_type:product)))-  
> > FilterCacheFilterWrapper(\_type:department)]]]; nested: "
> 
> I put my curl recreation here : [Elasticsearch 0.18.6 : My example of "parent child" · GitHub](https://gist.github.com/1941432)
> 
> 1- a file to create the index : "parent child" mapping  
> 2- a file to index the data : "parent child" data  
> 3- a file to query the index : "parent child" query
> 
> Thank you in advance.

---

<div class="post-metadata">

### Author: ![Chris\_2](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@Chris\_2](https://discuss.elastic.co/u/Chris_2)
#### Post date: [March 3, 2012, 11:39am UTC](https://discuss.elastic.co/t/problem-with-has-child-filter/6840/3 "2012-03-03T11:39:10Z")

</div>

ok great, thank you very much.

On 1 mar, 13:24, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Heya,
> 
> Its a problem with multi level parent/child mapping implementation. Opened an issue:[Multi level parent/child mapping and search fails · Issue #1751 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1751).
> 
> -shay.banon
> 
> On Wednesday, February 29, 2012 at 5:47 PM, Chris wrote:
> 
> > Hello,
> 
> > I'm trying to do an index with three levels : parent, child and  
> > "child of child".  
> > But i always have these failures when i post a query :
> 
> > "QueryPhaseExecutionException[[parent\_child][1]:  
> > query[filtered(name:auchan)-\>child\_filter[department/store]  
> > (filtered(filtered(name:toys)-\>child\_filter[product/department]  
> > (filtered(trademark:tiger)-\>FilterCacheFilterWrapper(\_type:product)))-
> > 
> > > FilterCacheFilterWrapper(\_type:department))],from[0],size[10]: Query
> 
> > Failed [Failed to execute child query [filtered(filtered(name:toys)-
> > 
> > > child\_filter[product/department](filtered(trademark:tiger)-  
> > > FilterCacheFilterWrapper(\_type:product)))-  
> > > FilterCacheFilterWrapper(\_type:department)]]]; nested: "
> 
> > I put my curl recreation here :[Elasticsearch 0.18.6 : My example of "parent child" · GitHub](https://gist.github.com/1941432)
> 
> > 1- a file to create the index : "parent child" mapping  
> > 2- a file to index the data : "parent child" data  
> > 3- a file to query the index : "parent child" query
> 
> > Thank you in advance.

---

<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:37am UTC](https://discuss.elastic.co/t/problem-with-has-child-filter/6840/4 "2017-07-06T03:37:32Z")

</div>


