if (!isNullOrEmpty(streamId)) {
filter = "streams:" + streamId;
}
try {
final HistogramResult histogramResult = searches.fieldHistogram(
query,
(String) config.get("field"),
Searches.DateHistogramInterval.valueOf(((String) config.get("interval")).toUpperCase()),
filter,
timeRange
);
return new ComputationResult(histogramResult.getResults(), histogramResult.took().millis(), histogramResult.getHistogramBoundaries());
} catch (Searches.FieldTypeException e) {
String msg = "Could not calculate [" + this.getClass().getCanonicalName() + "] widget <" + getId() + ">. Not a numeric field? The field was [" + config.get("field") + "]";
LOG.error(msg, e);
throw new RuntimeException(msg);
} catch (IndexHelper.InvalidRangeFormatException e) {