Query Range with Date Data

Hi Team,

Below is my filter configurations.

"filter": {
"range": {
"@timestamp": {
"gte": "now-5d",
"lte": "now-1d"
}
}
}

Requirement is to watch last 5 days data excluding current day.

I have tried multiple options but none seems to be working, as am doing time stamp based query it is including irrelevant data, like till this time.

I need the query to be run like 26-09-2018 to 30-09-2018 without timestamp limitations,

Thanks in advance

Look at the date math and rounding section here: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html

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