private FacetResultsHandler createFacetResultsHandler(FacetRequest fr) {
if (fr.getDepth() == 1 && fr.getSortOrder() == SortOrder.DESCENDING) {
FacetArraysSource fas = fr.getFacetArraysSource();
if (fas == FacetArraysSource.INT) {
return new IntFacetResultsHandler(taxonomyReader, fr, facetArrays);
}
if (fas == FacetArraysSource.FLOAT) {
return new FloatFacetResultsHandler(taxonomyReader, fr, facetArrays);
}