Lucene (Or KQL) query to filter current day of week

Hi there!

I have some data on Elasticsearch with a datetime field.

I would like to filter all the data where the dayofweek is the same as today's... this way, I would be able to get all friday's data, saturday's data, etc dynamically. (eg without changing the day of week each day)

I try a lot of things but I'm stuck...

In discover, I tried the following query expression (in Lucene) :

my_index_field.dayofweek=now.dayOfWeek

Of course, it doesn't recognize the now.dayOfWeek

Is is only possible to achieve something like that?

Best regards,

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.