# Elasticsearch 1.7 parent child filter aggregation inconsistent result

**URL:** <https://discuss.elastic.co/t/elasticsearch-1-7-parent-child-filter-aggregation-inconsistent-result/75981>\
**Category:** Elasticsearch\
**Created:** [February 22, 2017, 5:39am UTC](https://discuss.elastic.co/t/elasticsearch-1-7-parent-child-filter-aggregation-inconsistent-result/75981 "2017-02-22T05:39:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![khoan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khoan/32/3187_2.png) [@khoan](https://discuss.elastic.co/u/khoan)\
**Post date:** [February 22, 2017, 5:39am UTC](https://discuss.elastic.co/t/elasticsearch-1-7-parent-child-filter-aggregation-inconsistent-result/75981/1 "2017-02-22T05:39:56Z")

</div>

filter by date range doesn't seem to work for child aggregation as outlined in gist: [https://gist.github.com/khoan/7e98dd5310afb9c356ccede501b359b9](https://gist.github.com/khoan/7e98dd5310afb9c356ccede501b359b9)

GET bam/events/\_search returns two hits,  
but filtered\_by\_user\_id aggregation of GET bam/users/\_search return 5 hits for user\_id 123, and 3 hits for user\_id 125  
whereas I expect 1 hit for both user\_id 123 and user\_id 125.

Thanks.

---

<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:** [March 22, 2017, 5:40am UTC](https://discuss.elastic.co/t/elasticsearch-1-7-parent-child-filter-aggregation-inconsistent-result/75981/2 "2017-03-22T05:40:12Z")

</div>

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