Date range aggregation vs filters aggregation with range filter

Hello!

I use date range aggregation to calculate counts for several fixed periods
(like 'today', 'this week', 'this month' & etc). This variants are shown
via radio-buttons in web interface. Also I need to add "total" variant that
counts total number of documents .

My current solution uses total document count value from some upper level
source (like upper level filter aggregation or bucket of terms
aggregation). This causes a lot of complications in my source code.

I have an idea to simplify it by replacing date range aggregation with
filters aggregation that holds range filters for my periods and matchall
filter to count total value. I wonder is there any performance problems
with this solution? What is faster to execute, date rage aggregation or
filters aggregation with range filters?

Is there any other solutions for this problem?

Maxim

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7ebe5b84-ca86-468c-bcf0-7fe128417274%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.