Report query results back to elastic for weekly/monthly/yearly aggregations?

Hi,

Is there a good way to report query results back to elastic for weekly/monthly/yearly aggregations ?

Best regards,
Shirly Radco

You can use a date_histogram aggregation [1] on order to group the data based on time intervals and then as a child aggregation you can then add another aggregation (for example max, min etc.) that then computes statistics per interval.

1: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-aggregations-bucket-datehistogram-aggregation.html