Right now filter aggregations run in "compatible" mode if the top level query is `bool: {filter: { match_all: {}}}}` - but this really just just `match_all` in disguise. We should just run in filter-by-filter mode here.
server/src/test/java/org/elasticsearch/search/aggregations/bucket/filter/FiltersAggregatorTests.java
};
        debugTestCase(
            builder,
            new MatchAllDocsQuery(),
            buildIndex,
            (InternalFilters filters, Class<? extends Aggregator> impl, Map<String, Map<String, Object>> debug) -> {
                assertThat(filters.getBuckets(), hasSize(1));
                assertThat(filters.getBucketByKey("q1").getDocCount(), equalTo(10L));
                assertThat(impl, equalTo(FilterByFilterAggregator.class));
                assertMap(
                    debug,
                    matchesMap().entry(
                        "test",
                        matchesMap().entry("segments_counted", greaterThanOrEqualTo(1))
                            .entry("segments_collected", 0)
                            .entry("segments_with_doc_count_field", 0)
                            .entry("segments_with_deleted_docs", 0)
                            .entry(
                                "filters",
                                matchesList().item(
                                    matchesMap().entry("query", "*:*")
                                        .entry("specialized_for", "match_all")
                                        .entry("results_from_metadata", greaterThanOrEqualTo(1))
                                )
                            )
                    )
                );
            }
        );
    }