Lovika Jain February 2016

how to find the date range in uri request search in elasticsearch

I have a search in which i need to find the delta of data http://localhost:9200/index/index_type/_search?q=sampledate[21-02-2015 TO 22-02-2015]

but this search is giving me error could anybody help?

Answers


Richa February 2016

You can use below query:

GET /index_name/index_type/_search?q=dateCreated:[2016-01-06+TO+2016-01-07]

This will work only if dateCreated is a date field. Won't work with String

Post Status

Asked in February 2016
Viewed 1,842 times
Voted 6
Answered 1 times

Search




Leave an answer