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
static final byte ID = 2;
        private final long interval;
        private final ZoneId timeZone;
        TimeIntervalRounding(long interval, ZoneId timeZone) {
            if (interval < 1) throw new IllegalArgumentException("Zero or negative time interval not supported");
            this.interval = interval;
            this.timeZone = timeZone;
        }
        TimeIntervalRounding(StreamInput in) throws IOException {
            this(in.readVLong(), in.readZoneId());
        }
        @Override
        public void innerWriteTo(StreamOutput out) throws IOException {
            out.writeVLong(interval);
            out.writeZoneId(timeZone);
        }
        @Override
        public byte id() {
            return ID;
        }
        @Override
        public Prepared prepare(long minUtcMillis, long maxUtcMillis) {
            /*
             * 128 is a power of two that isn't huge. We might be able to do
             * better if the limit was based on the actual type of prepared
             * rounding but this'll do for now.
             */
            return prepareOffsetOrJavaTimeRounding(minUtcMillis, maxUtcMillis).maybeUseArray(minUtcMillis, maxUtcMillis, 128);
        }