Hi all,
Currently all my documents in my index contain the CleanDate field which is date type:
{"CleanDate" : "2020-04-24T05:42:00.000Z"}
My documents are being shipped into elasticsearch every minute.
Is there a way for me to include a filter on visualizations/dashboard to only include documents with CleanDate that are multiples of 5minutes?
ie.
Accepted
"2020-04-24T05:00:00.000Z"
"2020-04-24T05:05:00.000Z"
"2020-04-24T05:10:00.000Z"
"2020-04-24T05:15:00.000Z"
Rejected
"2020-04-24T05:01:00.000Z"
Solutioning
I have tried filtering by scripted fields as below:
return doc['CleanDate'].value.getMinute();
This does return the minute, however when I try to filter them using the filter UI icon, no records show up.
I've also tried using the following scripted field as per documentation to no luck:
return doc['CleanDate'].date.minuteOfHour;
This does not return anything -
Please help. Thanks!






