# Struggling with aggregation of terms using values from another field

**URL:** <https://discuss.elastic.co/t/struggling-with-aggregation-of-terms-using-values-from-another-field/138223>\
**Category:** Elasticsearch\
**Created:** [July 2, 2018, 2:08pm UTC](https://discuss.elastic.co/t/struggling-with-aggregation-of-terms-using-values-from-another-field/138223 "2018-07-02T14:08:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![touchstonemark](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@touchstonemark](https://discuss.elastic.co/u/touchstonemark)\
**Post date:** [July 2, 2018, 2:08pm UTC](https://discuss.elastic.co/t/struggling-with-aggregation-of-terms-using-values-from-another-field/138223/1 "2018-07-02T14:08:45Z")

</div>

Hi all, I have one field in my index which contains engineers names, and another field which contains ticket notes - and also within the notes text are the engineers names. I need to count how many records each engineer has with his name in the notes field. What is the best to achieve this ? As engineers come and go and did not want to reference specific names in a query if I can help it - hence why I wanted to refer to the field called 'engineer' instead to use those names in the aggregation if that makes sense.

---

<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 30, 2018, 2:08pm UTC](https://discuss.elastic.co/t/struggling-with-aggregation-of-terms-using-values-from-another-field/138223/2 "2018-07-30T14:08:47Z")

</div>

Closed on July 30, 2018, 2:08pm UTC

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