# Geohash aggregation with parent/child documents (grouping by parent id)

**URL:** <https://discuss.elastic.co/t/geohash-aggregation-with-parent-child-documents-grouping-by-parent-id/109654>\
**Category:** Elasticsearch\
**Created:** [November 29, 2017, 10:56pm UTC](https://discuss.elastic.co/t/geohash-aggregation-with-parent-child-documents-grouping-by-parent-id/109654 "2017-11-29T22:56:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt.veitas](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@matt.veitas](https://discuss.elastic.co/u/matt.veitas)\
**Post date:** [November 29, 2017, 10:56pm UTC](https://discuss.elastic.co/t/geohash-aggregation-with-parent-child-documents-grouping-by-parent-id/109654/1 "2017-11-29T22:56:11Z")

</div>

I am looking to do a geohash aggregation on a parent/child relationship. Our data model looks like the following:  
A contact can have multiple different types of locations associated with it (parent: contact, child: location). The location documents contain a `geo_point` data type.

We have started to look at parent/child due to the cost of having to update the parent document anytime any locations change.

We want to be able to the list of geohash grid buckets that contain a count of the number of unique contacts (parent id). Is this possible? We are using ES 6.0.0

---

<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:** [December 27, 2017, 10:56pm UTC](https://discuss.elastic.co/t/geohash-aggregation-with-parent-child-documents-grouping-by-parent-id/109654/2 "2017-12-27T22:56:22Z")

</div>

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