I am trying to query the data (using solr) and get graphs for detailing the day.
I am having a problem with the code snippet below:
solrQuery.addDateRangeFacet("startTimeISO", date1.toDate(), date2.toDate(), "%2B1DAY");
solrQuery.setQuery(queryString);
QueryResponse response = null;
try {
response = solrClient.getSolrServer(getCollectionName(Constants.WebPeerAnomaliesModelTuple()._1())).query(solrQuery);
} catch (Exception exp) {
LOGGER.error("Failed to get facet results: ", exp);
}
The error I get here is:
"Cannot add space% 2B1DAY to Fri Nov 14 06:37:30 PST 2014 for field: startTimeISO"
Can someone help me here what is the problem?
I'm not sure why "% 2B1DAY" will fail. I get the correct result when I do the same from the browser. If I request the following from the url, it will work: /select?facet=true&facet.date=startTimeISO&facet.date.start=NOW/DAY-30DAYS&facet.date.end=NOW/DAY%2B1DAY&facet.date.gap=%2B1DAY
, . . . .
: :
, .
Java- "% 2B1DAY" "+ 1Day".
, + is% 2B ( url)
.
, -.:)