public HistogramResult histogram(String query, DateHistogramInterval interval, TimeRange range) throws IndexHelper.InvalidRangeFormatException {
return histogram(query, interval, null, range);
}
public HistogramResult histogram(String query, DateHistogramInterval interval, String filter, TimeRange range) throws IndexHelper.InvalidRangeFormatException {
DateHistogramFacetBuilder fb = FacetBuilders.dateHistogramFacet("histogram")
.field("timestamp")
.interval(interval.toString().toLowerCase());
fb.facetFilter(standardFilters(range, filter));
QueryStringQueryBuilder qs = queryString(query);
qs.allowLeadingWildcard(configuration.isAllowLeadingWildcardSearches());
SearchRequestBuilder srb = c.prepareSearch();