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/main/java/org/elasticsearch/common/Rounding.java
final List<ZoneOffset> currentOffsets = timeZone.getRules().getValidOffsets(localMidnight);
                if (currentOffsets.isEmpty() == false) {
                    
                    final ZoneOffset firstOffset = currentOffsets.get(0);
                    final OffsetDateTime offsetMidnight = localMidnight.atOffset(firstOffset);
                    return offsetMidnight.toInstant().toEpochMilli();
                } else {
                    
                    
                    ZoneOffsetTransition zoneOffsetTransition = timeZone.getRules().getTransition(localMidnight);
                    return zoneOffsetTransition.getInstant().toEpochMilli();
                }
            }
            private LocalDateTime nextRelevantMidnight(LocalDateTime localMidnight) {
                assert localMidnight.toLocalTime().equals(LocalTime.MIDNIGHT) : "nextRelevantMidnight should only be called at midnight";
                return switch (unit) {
                    case DAY_OF_MONTH -> localMidnight.plus(1, ChronoUnit.DAYS);
                    case WEEK_OF_WEEKYEAR -> localMidnight.plus(7, ChronoUnit.DAYS);
                    case MONTH_OF_YEAR -> localMidnight.plus(1, ChronoUnit.MONTHS);
                    case QUARTER_OF_YEAR -> localMidnight.plus(3, ChronoUnit.MONTHS);
                    case YEAR_OF_CENTURY -> localMidnight.plus(1, ChronoUnit.YEARS);
                    default -> throw new IllegalArgumentException("Unknown round-to-midnight unit: " + unit);
                };
            }
            @Override
            public String toString() {
                return TimeUnitRounding.this + "[java.time to midnight]";
            }
        }
        private class JavaTimeNotToMidnightRounding extends AbstractNotToMidnightRounding {