Using a different date range format than what is defined on Elasticsearch cluster

I came across the post in which it is mentioned that reducing the time range matching to seconds precision would result in improvement in query latency.

In my table date format is "yyyy-mm-dd hh:mm:ss.NNN". When I'm trying to run a query like below, its failing with error which I guess is expected.

"range": {
     "timestamp": {
         "gte": "2017-12-22 00:00:00",
         "lte": "2018-01-22 23:59:59"
     }
}

Is there anyway I can run queries which will only match till seconds place ignoring the milliseconds?

Also, I was thinking restricting the query to indices would result in improvement in latency but queries took same time as simple time range match. Is this expected behavior?

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