3
GET /document/product/_search
{
  "query": {
    "match": {
      "filename": "Trident"
    }
},
  "range" : {
    "timestamp" : {
        "gt" : "now-24h"
    }
  }
}

So, I'm trying to return all data entry from the past 24 hours.

In the docs, the date format is "2014-01-07 00:00:00"

but my timestamp format is "2017-05-31T13:52:41.740Z"

I think because my date format is different from the docs, My query doesn't work. How would I be able to get past 24 hour entry with this date format?

Eric Chu
  • 1,649
  • 3
  • 20
  • 26

0 Answers0