void retrieveRemainingHitsForGroup(DocumentGroup documentGroup) {
            Set<String> oldRestrictList = query.getModel().getRestrict();
            try {
                int numMissingHits = documentGroup.targetNumberOfDocuments - numHits(documentGroup);
                int offset = numHits(documentGroup);

                query.getModel().getRestrict().clear();
                query.getModel().getRestrict().add(documentGroup.documentName);
                query.setWindow(offset, numMissingHits);
                partitionedResult.addHits(retrieveHits());

            } finally {
                restoreWindow();
                query.getModel().getRestrict().clear();
                query.getModel().getRestrict().addAll(oldRestrictList);
            }
        }
Groups hits according to document type.
For each group, the desired number of hits can be specified.

@author Tony Vaagenes
container-search/src/main/java/com/yahoo/prelude/searcher/MultipleResultsSearcher.java