private function getIndexTotals($hits)
    {
        $indexNames = $this->searchManager->getIndexNames();
        $indexCount = array_combine(
            $indexNames,
            array_fill(0, count($indexNames), 0)
        );

        foreach ($hits as $hit) {
            ++$indexCount[$hit->getDocument()->getIndex()];
        }

        return $indexCount;
    }