19

This is my elasticsearch query that intends to filter data between 11 pm and 12 pm on the day 2015.08.04. But it doesn't filter and gives many errors.

"query" : {"range" :
            {"@timestamp" :
              {"gt" : "2015-08-04  11:00:00", "lt" : "2015-08-04 12:00:00"} 
            } 
          }  
2
  • What error did you see?, and can you reformat your query, it's really hard to read. Commented Sep 17, 2015 at 0:46
  • The error was the timestamp format parsing error. Commented Sep 17, 2015 at 16:43

1 Answer 1

52

It works with the following query

{
   "query":{
      "range":{
         "@timestamp":{
            "gte":"2015-08-04T11:00:00",
            "lt":"2015-08-04T12:00:00"
         }
      }
   }
}
Sign up to request clarification or add additional context in comments.

1 Comment

What makes you think that, @NasserTahani ? The @ is part of the @timestamp variables name, and the query works correctly with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.