# Add addtional field to aggregation field how

**URL:** <https://discuss.elastic.co/t/add-addtional-field-to-aggregation-field-how/205475>\
**Category:** Elasticsearch\
**Created:** [October 28, 2019, 1:23pm UTC](https://discuss.elastic.co/t/add-addtional-field-to-aggregation-field-how/205475 "2019-10-28T13:23:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aagafonov77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aagafonov77/32/50335_2.png) [@aagafonov77](https://discuss.elastic.co/u/aagafonov77)\
**Post date:** [October 28, 2019, 1:23pm UTC](https://discuss.elastic.co/t/add-addtional-field-to-aggregation-field-how/205475/1 "2019-10-28T13:23:29Z")

</div>

Dear madam or sir,

I need your support.  
I had add products for my ES. Such as:

product {  
title: 'Moto saw Stihl MS 180',  
sku: 'st-180-32',  
price: '150',  
color: [  
{  
id: '23',  
image: 'images/colors/black.png',  
title: 'Black'  
},  
{  
id: '26',  
image: 'images/colors/gray.png',  
title: 'Gray'  
},  
{  
id: '28',  
image: 'images/colors/dark-gray.png',  
title: 'Dack-gray'  
},  
]  
}

How I can aggregate color field and add for aggregate buckets?

For exhample I would like use color.id for filtration and query that is ok.

But I would like get from aggregate results add + fields color.image and color.title.

How I can make it?

Alex

---

<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:** [November 25, 2019, 1:23pm UTC](https://discuss.elastic.co/t/add-addtional-field-to-aggregation-field-how/205475/2 "2019-11-25T13:23:30Z")

</div>

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