filter = "streams:" + streamId;
}
try {
UniversalSearch search = searchFactory.queryWithRangeAndFilter(q, timerange, filter);
FieldHistogramResponse histo = search.fieldHistogram(field, interval);
Map<String, Object> result = Maps.newHashMap();
AbsoluteRange boundaries = histo.getHistogramBoundaries();
result.put("time", histo.time);
result.put("interval", histo.interval);
result.put("values", histo.getFormattedResults(valueType));
result.put("from", boundaries.getFrom());
result.put("to", boundaries.getTo());
return ok(Json.toJson(result));
} catch (IOException e) {