# Aggregating by a specific field with possibility to show all the options available in that field

**URL:** <https://discuss.elastic.co/t/aggregating-by-a-specific-field-with-possibility-to-show-all-the-options-available-in-that-field/49196>\
**Category:** Elasticsearch\
**Created:** [May 4, 2016, 3:20pm UTC](https://discuss.elastic.co/t/aggregating-by-a-specific-field-with-possibility-to-show-all-the-options-available-in-that-field/49196 "2016-05-04T15:20:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![okliv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/okliv/32/9567_2.png) [@okliv](https://discuss.elastic.co/u/okliv)\
**Post date:** [May 4, 2016, 3:20pm UTC](https://discuss.elastic.co/t/aggregating-by-a-specific-field-with-possibility-to-show-all-the-options-available-in-that-field/49196/1 "2016-05-04T15:20:11Z")

</div>

Hi! as described here

[http://stackoverflow.com/questions/37025185/elasticsearch-aggregating-by-a-specific-field-with-possibility-to-show-all-the/](http://stackoverflow.com/questions/37025185/elasticsearch-aggregating-by-a-specific-field-with-possibility-to-show-all-the/)

i need to implement faceting with "non-self-affecting" facets: when bucket's `doc_count` decreases for each bucket only in case if there is another faceting field filter(s) is(are) applied. in my example above `:diagonal` have to affect `:brand_ids` facet and `:brand_ids` facet have to affect `:diagonal` buckets but without "self-affecting"

hope it is clear enough what am i asking about

thank you

---

<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 5, 2017, 10:53pm UTC](https://discuss.elastic.co/t/aggregating-by-a-specific-field-with-possibility-to-show-all-the-options-available-in-that-field/49196/2 "2017-07-05T22:53:58Z")

</div>


