# Aggregation that includes non-matching items

**URL:** <https://discuss.elastic.co/t/aggregation-that-includes-non-matching-items/356986>\
**Category:** Elasticsearch\
**Created:** [April 8, 2024, 3:02pm UTC](https://discuss.elastic.co/t/aggregation-that-includes-non-matching-items/356986 "2024-04-08T15:02:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mschoettl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mschoettl/32/123639_2.png) [@mschoettl](https://discuss.elastic.co/u/mschoettl)\
**Post date:** [April 8, 2024, 3:02pm UTC](https://discuss.elastic.co/t/aggregation-that-includes-non-matching-items/356986/1 "2024-04-08T15:02:06Z")

</div>

Hi,

we use Elasticsearch to drive an ecommerce shop. The index consists of products, let's assume there are 100 products there is a field called "color". 50 products have the color red and 50 products have the color blue. I know want to build an aggregation that tells me the product count for all colors. The values of the aggregation will be: red:50 and blue:50. Now i filter for red products only. The aggregation value will now only provide red:50. Is there any way to still get the non-matching values for red:50 somehow in the query result?

Background: I want to use the aggregation as a filter that displays the filter criteria and the hit count per color value, but also in the case a specific color is selected

Thx
