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
}
        @Override
        public TimeUnitPreparedRounding prepareJavaTime() {
            if (unitRoundsToMidnight) {
                return new JavaTimeToMidnightRounding();
            }
            return new JavaTimeNotToMidnightRounding(unit.field.getBaseUnit().getDuration().toMillis());
        }
        @Override
        public long offset() {
            return 0;
        }
        @Override
        public Rounding withoutOffset() {
            return this;
        }
        @Override
        public int hashCode() {
            return Objects.hash(unit, timeZone);
        }
        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            TimeUnitRounding other = (TimeUnitRounding) obj;
            return Objects.equals(unit, other.unit) && Objects.equals(timeZone, other.timeZone);