private Result sortAndTrimResults(Result result, Query q, int offset, int hits, Execution execution) {
        if (q.getRanking().getSorting() != null) {
            // TODO: remove or rename this internal summary class for Vespa 9
            execution.fill(result, VespaBackend.SORTABLE_ATTRIBUTES_SUMMARY_CLASS);
            result.hits().sort();
        }
        result.hits().trim(offset, hits);
        return result;
    }
Produce a single blended hit list from a group of hitgroups.

This assumes that all hits are organized into hitgroups. If not, blending will not be performed.
container-search/src/main/java/com/yahoo/prelude/searcher/BlendingSearcher.java