private void handleRemovedHit(Hit hit) {
        if ( ! hit.isAuxiliary()) {
            concreteHitCount--;
            if ( ! hit.isCached())
                notCachedCount--;
        }
        else if (hit instanceof HitGroup) {
            subgroupCount--;
        }
        else if (hit instanceof DefaultErrorHit) {
            errorHit = null;
        }

        if (SortDataHitSorter.isSortable(hit, currentSorting())) {
            hitsWithSortData--;
        }

        if (deletionBreaksOrdering) {
            hitsSorted = false;
        }
    }
Ensures result invariants. Must be called when a hit is added to this result.
container-search/src/main/java/com/yahoo/search/result/HitGroup.java