void add(Hit hit, boolean addOtherHits) {
            String documentName = (String)hit.getField(Hit.SDDOCNAME_FIELD);

            if (documentName != null) {
                HitGroup resultSet = resultSets.get(documentName);

                if (resultSet != null) {
                    resultSet.add(hit);
                    return;
                }
            }

            if (addOtherHits) {
                otherHits.add(hit);
            }
        }
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