Add addtional field to aggregation field how

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

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