How to write Filter in JAVA Api?

(Rajnikant) #1

Here My Code is
POST vehicletracking/_search
"filter": {
"range": {
"localtimestamp": {
"gte": "2016-02-01",
"lte": "2016-02-05"

How to write this code in Java Api?

(David Pilato) #2

Read here:

(Rajnikant) #3

When I use
QueryBuilder qb2 = QueryBuilders.rangeQuery("localtimestamp")

then i get this type of error.
"Failed to execute phase [query], all shards failed; shardFailures".

(David Pilato) #4

Can't tell without details:

Full trace
Actual Mapping

(system) #5