# Doing a AND query on childs

**URL:** <https://discuss.elastic.co/t/doing-a-and-query-on-childs/11798>\
**Category:** Elasticsearch\
**Created:** [May 3, 2013, 2:08pm UTC](https://discuss.elastic.co/t/doing-a-and-query-on-childs/11798 "2013-05-03T14:08:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christophe\_Moins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophe_moins/32/2350_2.png) [@Christophe\_Moins](https://discuss.elastic.co/u/Christophe_Moins)\
**Post date:** [May 3, 2013, 2:08pm UTC](https://discuss.elastic.co/t/doing-a-and-query-on-childs/11798/1 "2013-05-03T14:08:20Z")

</div>

Hello,

I have an index with two types of documents, places and prices, places are  
parents of prices.

See sample here: [https://gist.github.com/MrMoins/71a69c3d5cad40e29089](https://gist.github.com/MrMoins/71a69c3d5cad40e29089)

I try to make a request to find the places having prices with particular  
status and search ID.  
In my gist you can see the request giving me a result, but in fact it  
should not.

am I doing something wrong?

Thanks

PS: original post on Elasticsearch FR Group  
[https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch-fr/jZJHaBsszQk](https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch-fr/jZJHaBsszQk)

--  
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:** ![Christophe\_Moins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophe_moins/32/2350_2.png) [@Christophe\_Moins](https://discuss.elastic.co/u/Christophe_Moins)\
**Post date:** [May 3, 2013, 4:19pm UTC](https://discuss.elastic.co/t/doing-a-and-query-on-childs/11798/2 "2013-05-03T16:19:38Z")

</div>

I've update my gist, with the solution.

On Friday, May 3, 2013 4:08:20 PM UTC+2, Christophe Moins wrote:

> Hello,
> 
> I have an index with two types of documents, places and prices, places are  
> parents of prices.
> 
> See sample here: [https://gist.github.com/MrMoins/71a69c3d5cad40e29089](https://gist.github.com/MrMoins/71a69c3d5cad40e29089)
> 
> I try to make a request to find the places having prices with particular  
> status and search ID.  
> In my gist you can see the request giving me a result, but in fact it  
> should not.
> 
> am I doing something wrong?
> 
> Thanks
> 
> PS: original post on Elasticsearch FR Group  
> [Redirecting to Google Groups](https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch-fr/jZJHaBsszQk)

--  
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:38am UTC](https://discuss.elastic.co/t/doing-a-and-query-on-childs/11798/3 "2017-07-06T02:38:26Z")

</div>

Closed on July 6, 2017, 2:38am UTC


