}
private static DocComparatorSource getComparatorSource(Browsable browser, SortField sf) {
DocComparatorSource compSource = null;
if (SortField.FIELD_DOC.equals(sf)) {
compSource = new DocIdDocComparatorSource();
} else if (SortField.FIELD_SCORE.equals(sf) || sf.getType() == SortField.Type.SCORE) {
// we want to do reverse sorting regardless for relevance
compSource = new ReverseDocComparatorSource(new RelevanceDocComparatorSource());
} else if (sf instanceof BoboCustomSortField) {
BoboCustomSortField custField = (BoboCustomSortField) sf;