# Has\_child query with multiple type?

**URL:** https://discuss.elastic.co/t/has-child-query-with-multiple-type/125165
**Category:** Elasticsearch
**Created:** [March 22, 2018, 10:18am UTC](https://discuss.elastic.co/t/has-child-query-with-multiple-type/125165 "2018-03-22T10:18:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![prasanth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prasanth/32/28662_2.png) [@prasanth](https://discuss.elastic.co/u/prasanth)
#### Post date: [March 22, 2018, 10:18am UTC](https://discuss.elastic.co/t/has-child-query-with-multiple-type/125165/1 "2018-03-22T10:18:33Z")

</div>

I have a parent which has multiple different types of children. Is it possible to preform a has\_child search over multiple types of children?

something like

> ```
> {
> "has_child" : {
> "type" : "*",       
> "query" : {
> "term" : {
> "tag" : "something"
> }
> }
> }
> }
> 
> ```

---

<div class="post-metadata">

### Author: ![jimczi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jimczi/32/47985_2.png) [@jimczi](https://discuss.elastic.co/u/jimczi)
#### Post date: [March 30, 2018, 1:23pm UTC](https://discuss.elastic.co/t/has-child-query-with-multiple-type/125165/2 "2018-03-30T13:23:05Z")

</div>

No that's not possible, you'll need to do one query per child type.

---

<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: [April 27, 2018, 1:23pm UTC](https://discuss.elastic.co/t/has-child-query-with-multiple-type/125165/3 "2018-04-27T13:23:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
