is it possible to bucket on the count() of aggregates? The grammar Select parameter language grammar seems to suggest that it is but I could be interpreting it wrong.
My rough interpretation:
predefined([expr = (aggr = (count())], bucket(...))
( "predefined" "(" exp "," "(" bucket ( "," bucket )* ")" ")" ) |
exp ::= ( "+" | "-") ( "$" identifier [ "=" math ] ) | ( math ) | ( aggr )
aggr ::= ( ( "count" "(" ")" ) |
( "sum" "(" exp ")" ) |
( "avg" "(" exp ")" ) |
( "max" "(" exp ")" ) |
attempt ("Expression 'count()' not applicable for single hit.")
all(group(predefined(status, bucket["field1"] ) ) each(
all(group(predefined(count(), bucket[0,10>, bucket[11,20>)) each(
output(count() as(count)
))
))