# Can you explain this to me?

**URL:** <https://discuss.elastic.co/t/can-you-explain-this-to-me/592>\
**Category:** Elasticsearch\
**Created:** [May 13, 2015, 5:49am UTC](https://discuss.elastic.co/t/can-you-explain-this-to-me/592 "2015-05-13T05:49:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![belendel](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@belendel](https://discuss.elastic.co/u/belendel)\
**Post date:** [May 13, 2015, 5:49am UTC](https://discuss.elastic.co/t/can-you-explain-this-to-me/592/1 "2015-05-13T05:49:30Z")

</div>

Hi,

I want to make a filter which should work the following way:

Filter A:  
Option 1  
Option 2  
Option 3

Filter B:  
Option 1  
Option 2  
Option 3

Now if you see select a value in Filtter A the values in Filter B should be narrowed down. So for example Only Option 1 should be left to select. However Filter A should not work narrow on itself, so you should be able to select multiple values in Filter A. After digging around my solution is to apply the filters to the results as post\_filter. Then apply the active filters as aggregation filter to all other filters except itself. I have been testing with the following data:

| name | minutes | minutes\_cost | megabytes | megabytes\_cost | monthly\_cost | fee | contract\_length |  
| Test abonnement 1 | 300 | 250 | 1000 | 750 | 1000 | 1000 | 12 |  
| Test abonnement 2 | 300 | 250 | 2000 | 750 | 1000 | 1000 | 24 |  
| Test abonnement 3 | 300 | 250 | 3000 | 750 | 1000 | 1000 | 12 |  
| Test abonnement 4 | 100 | 250 | 4000 | 750 | 1100 | 1000 | 12 |  
| Test abonnement 5 | 200 | 250 | 5000 | 750 | 1100 | 1000 | 12 |  
| Test abonnement 6 | 400 | 250 | 1000 | 750 | 1100 | 1000 | 12 |  
| Test abonnement 7 | 500 | 250 | 1000 | 750 | 1200 | 1000 | 12 |  
| Test abonnement 8 | 500 | 250 | 1000 | 750 | 1300 | 1000 | 12 |  
| Test abonnement 9 | 300 | 250 | 1000 | 750 | 1300 | 1000 | 1 |  
| Test abonnement 10 | 300 | 250 | 1000 | 750 | 1300 | 1000 | 12 |  
| Test abonnement 11 | 300 | 250 | 1000 | 750 | 1400 | 1000 | 12 |

And the following request: [http://pastebin.com/Bx4gFZ1S](http://pastebin.com/Bx4gFZ1S)  
And i get the following result: [http://pastebin.com/t8TkiYNx](http://pastebin.com/t8TkiYNx)

Now with min\_doc\_count 0 for minutes i expect to get all values back. I do get 100 minutes with count 0, however 200 minutes with count 0 is missing. Why is this?

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [May 13, 2015, 3:14pm UTC](https://discuss.elastic.co/t/can-you-explain-this-to-me/592/2 "2015-05-13T15:14:10Z")

</div>

Thank you for the report, this is a bug. I just opened [https://github.com/elastic/elasticsearch/issues/11150](https://github.com/elastic/elasticsearch/issues/11150)

---

<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 6, 2017, 12:14am UTC](https://discuss.elastic.co/t/can-you-explain-this-to-me/592/3 "2017-07-06T00:14:16Z")

</div>


