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
throw new IllegalArgumentException("NOT YET IMPLEMENTED for unit " + unit);
            }
        }
        @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);
        }
        private TimeUnitPreparedRounding prepareOffsetOrJavaTimeRounding(long minUtcMillis, long maxUtcMillis) {
            /*
             minUtcMillis has to be decreased by 2 units.
             This is because if a minUtcMillis can be rounded down up to unit.extraLocalOffsetLookup
             and that rounding down might still fall within DST gap/overlap.
             Meaning that minUtcMillis has to be decreased by additional unit
             so that the transition just before the minUtcMillis is applied
             */
            long minLookup = minUtcMillis - 2 * unit.extraLocalOffsetLookup();
            long maxLookup = maxUtcMillis;
            long unitMillis = 0;
            if (false == unitRoundsToMidnight) {
                /*
                 * Units that round to midnight can round down from two
                 * units worth of millis in the future to find the
                 * nextRoundingValue.
                 */
                unitMillis = unit.field.getBaseUnit().getDuration().toMillis();