public HistogramResult fieldHistogram(String query, String field, Indexer.DateHistogramInterval interval, String filter, TimeRange range) throws FieldTypeException, IndexHelper.InvalidRangeFormatException {
DateHistogramFacetBuilder fb = FacetBuilders.dateHistogramFacet("histogram")
.keyField("timestamp")
.valueField(field)
.interval(interval.toString().toLowerCase());
<BUG>fb.facetFilter(standardFilters(range, filter));
SearchRequestBuilder srb = c.prepareSearch();</BUG>
srb.setIndices(IndexHelper.determineAffectedIndices(server, range).toArray(new String[]{}));
<BUG>srb.setQuery(queryString(query));
srb.addFacet(fb);</BUG>
SearchResponse r;

public HistogramResult fieldHistogram(String query, String field, Indexer.DateHistogramInterval interval, String filter, TimeRange range) throws FieldTypeException, IndexHelper.InvalidRangeFormatException {
DateHistogramFacetBuilder fb = FacetBuilders.dateHistogramFacet("histogram")
.keyField("timestamp")
.valueField(field)
.interval(interval.toString().toLowerCase());
fb.facetFilter(standardFilters(range, filter));
QueryStringQueryBuilder qs = queryString(query);
qs.allowLeadingWildcard(server.getConfiguration().isAllowLeadingWildcardSearches());
SearchRequestBuilder srb = c.prepareSearch();
srb.setIndices(IndexHelper.determineAffectedIndices(server, range).toArray(new String[]{}));
srb.setQuery(qs);
srb.addFacet(fb);
SearchResponse r;
