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
);
                IndexSearcher searcher = newIndexSearcher(limitedReader);
                AggregationContext context = createAggregationContext(searcher, new MatchAllDocsQuery());
                FilterByFilterAggregator aggregator = createAggregator(builder, context);
                aggregator.preCollection();
                searcher.search(context.query(), aggregator);
                aggregator.postCollection();
                InternalAggregation result = aggregator.buildTopLevel();
                result = result.reduce(
                    List.of(result),
                    new AggregationReduceContext.ForFinal(
                        context.bigArrays(),
                        getMockScriptService(),
                        () -> false,
                        builder,
                        b -> {},
                        PipelineTree.EMPTY
                    )
                );
                InternalFilters filters = (InternalFilters) result;
                assertThat(filters.getBuckets(), hasSize(1));
                assertThat(filters.getBucketByKey("q1").getDocCount(), equalTo(5L));
                Map<String, Object> debug = new HashMap<>();
                aggregator.collectDebugInfo(debug::put);
                assertMap(
                    debug,
                    matchesMap().entry("segments_counted", greaterThanOrEqualTo(1))
                        .entry("segments_collected", 0)
                        .entry("segments_with_doc_count_field", 0)
                        .entry("segments_with_deleted_docs", 0)