# Has\_child queries fail if queryName is set

**URL:** <https://discuss.elastic.co/t/has-child-queries-fail-if-queryname-is-set/16474>\
**Category:** Elasticsearch\
**Created:** [March 19, 2014, 5:02pm UTC](https://discuss.elastic.co/t/has-child-queries-fail-if-queryname-is-set/16474 "2014-03-19T17:02:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Riyaz](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@Riyaz](https://discuss.elastic.co/u/Riyaz)\
**Post date:** [March 19, 2014, 5:02pm UTC](https://discuss.elastic.co/t/has-child-queries-fail-if-queryname-is-set/16474/1 "2014-03-19T17:02:30Z")

</div>

Hi,

I am using elasticsearch v0.90.5 and trying to set QueryName (\_name) for a  
has\_child query as described  
here: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-request-named-queries-and-filters.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-request-named-queries-and-filters.html)

But the has\_child queries are failing if queryName is set. They also fail  
if queryName is set on a wrapping query. You can find the curl recreation  
here: [https://gist.github.com/hmrizin/9645816](https://gist.github.com/hmrizin/9645816)

What am I missing? Any help appreciated.

Thanks  
Riyaz

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [March 20, 2014, 11:21am UTC](https://discuss.elastic.co/t/has-child-queries-fail-if-queryname-is-set/16474/2 "2014-03-20T11:21:57Z")

</div>

This is a bug and has been fixed. Can you try using the latest 0.90.x  
release or maybe upgrade to the latest 1.0.x release?

On 20 March 2014 00:02, Riyaz [mohamed.riyaz@gmail.com](mailto:mohamed.riyaz@gmail.com) wrote:

> Hi,
> 
> I am using elasticsearch v0.90.5 and trying to set QueryName (\_name) for a  
> has\_child query as described here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-request-named-queries-and-filters.html)
> 
> But the has\_child queries are failing if queryName is set. They also fail  
> if queryName is set on a wrapping query. You can find the curl recreation  
> here: [Elasticsearch has\_child queries throw error if queryName is set. · GitHub](https://gist.github.com/hmrizin/9645816)
> 
> What am I missing? Any help appreciated.
> 
> Thanks  
> Riyaz
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CA%2BA76TzEDDc8snopE\_pgv%2BpTfUsm0XEpH2ZncB7K8O%3DkAEnb1A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2BA76TzEDDc8snopE_pgv%2BpTfUsm0XEpH2ZncB7K8O%3DkAEnb1A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Riyaz](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@Riyaz](https://discuss.elastic.co/u/Riyaz)\
**Post date:** [March 20, 2014, 1:58pm UTC](https://discuss.elastic.co/t/has-child-queries-fail-if-queryname-is-set/16474/3 "2014-03-20T13:58:54Z")

</div>

Thanks Martijn

Tried in v0.90.12 and it works. Thank You!

On Thursday, March 20, 2014 7:21:57 AM UTC-4, Martijn v Groningen wrote:

> This is a bug and has been fixed. Can you try using the latest 0.90.x  
> release or maybe upgrade to the latest 1.0.x release?
> 
> On 20 March 2014 00:02, Riyaz \<[mohame...@gmail.com](mailto:mohame...@gmail.com) \<javascript:\>\> wrote:
> 
> > Hi,
> > 
> > I am using elasticsearch v0.90.5 and trying to set QueryName (\_name) for  
> > a has\_child query as described here:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-request-named-queries-and-filters.html)
> > 
> > But the has\_child queries are failing if queryName is set. They also fail  
> > if queryName is set on a wrapping query. You can find the curl recreation  
> > here: [Elasticsearch has\_child queries throw error if queryName is set. · GitHub](https://gist.github.com/hmrizin/9645816)
> > 
> > What am I missing? Any help appreciated.
> > 
> > Thanks  
> > Riyaz
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/7bc36970-9bcd-4fc1-b3ab-fe16ca07df93%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/fe889a90-7afe-4574-ab2d-dc1b89dd601d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fe889a90-7afe-4574-ab2d-dc1b89dd601d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:41am UTC](https://discuss.elastic.co/t/has-child-queries-fail-if-queryname-is-set/16474/4 "2017-07-06T01:41:52Z")

</div>


