I'm trying to create a range query in ES.
Here's my Java example:
QueryBuilder qb = QueryBuilders.rangeQUery("updateTime")
.from(fromDate)
.to(toDate)
WHen I print it out, it looks like this:
{
"range" : {
"updateTime" : {
"from" : "2016-03-18-T15:00:00.000Z",
"to" : "2016-03-28-T15:00:00.000Z",
"include_lower" : true,
"include_upper" : true
}
}
}
I get all shards failed error.
Then I get a Null Pointer when trying to access the response.
I know there is data for those dates..
Looks like I'm getting a NumberFormatException fo{for input string: "2016-03-18T15:00:00.000Z"
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:228)
org.elasticsearch.action.seasrch.type.TransportSearchTypeAction$BaseAsyncAction$1.onFailure(TransportSearchTypeAction.java:174)
at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandlerjava:46)
I can't copy the whole error because I'm working on a unconnected system.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.