private void addGroup(DocumentGroup group) throws ParameterException {
            final String documentName = group.documentName;
            if ( resultSets.put(group.documentName,
                    new HitGroup(documentName) {
                        /**
                         *
                         */
                        private static final long serialVersionUID = 5732822886080288688L;
                    })
                 != null ) {

                throw new ParameterException("Document name " + group.documentName + "mentioned multiple times");
            }
        }
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