Hello I am trying to write a custom dsl query to add a filter that only includes week ends and or one that only includes weekends. I'm going to make two separate filters. I am new to Elastic and JSON. I also don't have permissions to access index so I cannot created a scripted field. My date field is "entryDate".
doc['entryDate'].date.dayOfWeek == 6
I know this is off but I just wanted to show what I have so far. Thanks so much.
To do this, you'll want to switch the language from KQL to Lucene (I know, not the most intuitive), and then take everything inside "query" and put it in the query bar.
Okay I switched to Lucene and in the query bar I entered:
"entryDate.date.dayOfWeek == 6" I want to eventually only return dates that fall on the weekend but just tried for Saturday now. This query reduced the number of hits and I didn't get an error, however its still showing records from 7/31/19 which did not fall on a Saturday. Any idea what I'm missing thank you.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.