I need to make some data grouped by day of the week and hour, for example
curl -XGET http://localhost:9200/testing/hello/_search?pretty=true -d ' { "size": 0, "aggs": { "articles_over_time" : { "date_histogram" : { "field" : "date", "interval" : "hour", "format": "E - k" } } } } '
Gives me this:
{ "took" : 2, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 2857, "max_score" : 0.0, "hits" : [ ] }, "aggregations" : { "articles_over_time" : { "buckets" : [ { "key_as_string" : "Fri - 17", "key" : 1391792400000, "doc_count" : 6 }, ... { "key_as_string" : "Wed - 22", "key" : 1411596000000, "doc_count" : 1 }, { "key_as_string" : "Wed - 22", "key" : 1411632000000, "doc_count" : 1 } ] } } }
Now I need to summarize the document counters by this value "Wed - 22", how can I do this? Maybe some other approach?
source share