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
return DateTimeUnit.valueOf(name.toUpperCase(Locale.ROOT));
        }
        public String shortName() {
            return shortName;
        }
        public static DateTimeUnit resolve(byte id) {
            return switch (id) {
                case 1 -> WEEK_OF_WEEKYEAR;
                case 2 -> YEAR_OF_CENTURY;
                case 3 -> QUARTER_OF_YEAR;
                case 4 -> MONTH_OF_YEAR;
                case 5 -> DAY_OF_MONTH;
                case 6 -> HOUR_OF_DAY;
                case 7 -> MINUTES_OF_HOUR;
                case 8 -> SECOND_OF_MINUTE;
                default -> throw new ElasticsearchException("Unknown date time unit id [" + id + "]");
            };
        }
    }
    public abstract void innerWriteTo(StreamOutput out) throws IOException;
    @Override
    public void writeTo(StreamOutput out) throws IOException {
        out.writeByte(id());
        innerWriteTo(out);
    }
    public abstract byte id();
    /**
     * A strategy for rounding milliseconds since epoch.
     */
    public interface Prepared {