# Has\_child search query broken?

**URL:** <https://discuss.elastic.co/t/has-child-search-query-broken/11224>\
**Category:** Elasticsearch\
**Created:** [March 20, 2013, 5:11pm UTC](https://discuss.elastic.co/t/has-child-search-query-broken/11224 "2013-03-20T17:11:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eran\_Eidinger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eran_eidinger/32/44831_2.png) [@Eran\_Eidinger](https://discuss.elastic.co/u/Eran_Eidinger)\
**Post date:** [March 20, 2013, 5:11pm UTC](https://discuss.elastic.co/t/has-child-search-query-broken/11224/1 "2013-03-20T17:11:24Z")

</div>

I am trying to search with has\_child

I used the simplest query possible to test it.

The query returns an exception that says the child has no parent mapping:

"Type [child\_type] does not have parent mapping"

The mapping says otherwise.

I made sure i am only querying the relevant index ( as suggested in [http://elasticsearch-users.115913.n3.nabble.com/Parent-Mapping-missing-td3294789.html](http://elasticsearch-users.115913.n3.nabble.com/Parent-Mapping-missing-td3294789.html))

I created a gist for it.

> <https://gist.github.com/eranid/5206390>

Any idea what could cause this?

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [March 21, 2013, 10:40am UTC](https://discuss.elastic.co/t/has-child-search-query-broken/11224/2 "2013-03-21T10:40:19Z")

</div>

On Wed, 2013-03-20 at 10:11 -0700, eranid wrote:

> I am trying to search with has\_child
> 
> I used the simplest query possible to test it.
> 
> The query returns an exception that says the child has no parent mapping:
> 
> "Type [child\_type] does not have parent mapping"
> 
> The mapping says otherwise.
> 
> I made sure i am only querying the relevant index ( as suggested in  
> [http://elasticsearch-users.115913.n3.nabble.com/Parent-Mapping-missing-td3294789.html](http://elasticsearch-users.115913.n3.nabble.com/Parent-Mapping-missing-td3294789.html))
> 
> I created a gist for it.  
> [has\_child query fails with "does not have parent mapping" · GitHub](https://gist.github.com/eranid/5206390)
> 
> Any idea what could cause this?

Could you gist a full recreation for this? Your current gist only has  
part of the data.

I tried to recreate the problem from the info you gave, but it worked  
correctly for me. Also, what version of ES?

clint

--  
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:45am UTC](https://discuss.elastic.co/t/has-child-search-query-broken/11224/3 "2017-07-06T02:45:28Z")

</div>


