@Override
    public Hit add(Hit hit) {
        if (hit.isMeta() && hit instanceof DefaultErrorHit) {
            if (errorHit != null) {
                errorHit.addErrors((DefaultErrorHit)hit);
                return errorHit; // don't add another error hit
            }
            else {
                errorHit = merge(consumeAnyQueryErrors(), (DefaultErrorHit) hit);
                hit = errorHit; // Add this hit below
            }
        }
        handleNewHit(hit);
        hits.add(hit);
        return hit;
    }
Adds a hit to this group.
If the given hit is an ErrorHit and this group already have an error hit,
the errors in the given hit are merged into the errors of this.

@return the resulting hit - this is usually the input hit, but if an error hit was added,
        and there was already an error hit present, that hit, containing the merged information
        is returned
container-search/src/main/java/com/yahoo/search/result/HitGroup.java