Hi all,
I'm trying to create a query to retrieve a list of elements that indicates the number of appearance for current day.
For example, I have logs with logLevel that could be ERROR, INFO, WARN, ..
So far I have this, but what I'm not able to do is just display the ones from current day
"aggs": {
"count" : {
"terms" : {
"field" : "logLevel.keyword"
}
}
}
Result from the query above
... },
"aggregations" : {
"count" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"key" : "INFO",
"doc_count" : 311355
},
{
"key" : "WARN",
"doc_count" : 26441
},
{
"key" : "ERROR",
"doc_count" : 15065
}
]
}
}
}
How can I filter the query in order to get just the number of records generated during current day?
Thanks in advance