How to get a document based on creation data with interval of time

Hi Team,

I have a use case like, I have to get the document for every 6 hours
I do like creationDate >= current_timestamp - interval '6 hour' in DB
But how do I get this in elastic search ?
My mapping
"creationDate": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss",
"doc_values": true
},
I am using elasticsearch 1.3.7
Kindly anybody help me on this..
Thanks in advance.

will it applied with time task to get docs per 6 hours?
this may help https://www.elastic.co/guide/en/elasticsearch/reference/1.7/query-dsl-range-query.html

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