Can you explain this to me?

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
And i get the following result: 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?

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