How to fetch data from elasticsearch based on stored field(date)


#1

I am using java REST client api to fetch data from elasticsearch. Here i am fetching data based on id ie, "twitter/tweet/1", but i want to retrieve all the the records for the given date. is there any way to filter it?


(David Pilato) #2

This?

GET _search
{
    "query": {
        "range" : {
            "created_at" : {
                "gte": "01/01/2017"
            }
        }
    }
}

(system) #3

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