How to write Filter in JAVA Api?

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?

Read here:

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

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

Can't tell without details:

Full trace
Actual Mapping