srb = standardSearchRequest(query, IndexHelper.determineAffectedIndices(indexRangeService, deflector, range));
} else {
srb = filteredSearchRequest(query, filter, IndexHelper.determineAffectedIndices(indexRangeService, deflector, range));
}
StatisticalFacetBuilder stats = new StatisticalFacetBuilder(STATS_FACET_NAME);
stats.global(false);
stats.facetFilter(standardFilters(range, filter));
stats.field(field);
srb.addFacet(stats);
SearchResponse r;
final SearchRequest request;