Aggregations: Year over Year, Week over Week

Assuming I have a date field on a document, I know using the date_histogram
aggregation I can get a document count by day, month, year, etc.

What I want to do is get the average document count for January, February,
March, etc. over several given years. The same goes for Monday, Tuesday,
Wednesday, etc. over several given weeks. Is there a way to do this having
just that same date field or what is the best way to accomplish this with

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
To view this discussion on the web visit
For more options, visit