public Hit remove(URI uri) {
        for (Iterator<Hit> it = hits.iterator(); it.hasNext(); ) {
            Hit hit = it.next();
            if (uri.equals(hit.getId())) {
                it.remove();
                handleRemovedHit(hit);
                return hit;
            }
            else if (hit instanceof HitGroup) {
                Hit removed = ((HitGroup)hit).remove(uri);
                if (removed != null) {
                    return removed;
                }
            }
        }
        return null;
    }
Removes a hit from this group or any subgroup.

@param uri the uri of the hit to remove.
@return the hit removed, or null if not found.
container-search/src/main/java/com/yahoo/search/result/HitGroup.java