Result createMultipleResultSets() {
            Iterator<Hit> i = initialResult.hits().iterator();
            while (i.hasNext()) {
                i.next();
                i.remove();
            }

            for (DocumentGroup group: parameters.documentGroups) {
                partitionedResult.cropResultSet(group.documentName,group.targetNumberOfDocuments);
            }

            partitionedResult.insertInto(initialResult.hits());
            return initialResult;
        }
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