Hi,
I wanna make a simple query that range specific time of the day.
But It seems to be necessary to write the date in elasticsearch query.
What I want is using only time in range syntax, so that I can use that script everyday to extract the specific time range's daily logs without editing.
Below is my query:
(it's working currently, but I want remove the date)
{
"size": 10,
"query": {
"constant_score": {
"filter": {
"bool": {
"filter": [
{
"terms": {
"ID": [
10157
]
}
},
{
"range": {
"EVENT_TIME": {
"gte": "2018-07-27 00:00:00.000",
"lt": "2018-07-27 02:59:59.999",
"format": "yyyy-MM-dd HH:mm:ss.SSS",
"time_zone": "+09:00"
}
}
}
]
}
}
}
}
}
Any comment would be appreciated. Thanks.