Since there is not a lot of information around painless yet I hope there is someone here with experience in it.
I want to filter all messages that happend on the same day of the week. So like today I want all messages that happend on a wednesday.
So is there a way to get todays Date?
This is my script but today.date.dayOfWeek should get changed.
(I would like to do the same with the hour)
GET _search
{
"query": {
"bool": {
"filter": {
"script": {
"script": "doc['@timestamp'].date.dayOfWeek == today.date.dayOfWeek"
}
}
}
}
}