src/Sulu/Bundle/SearchBundle/Controller/SearchController.php
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;
    }
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;
    }
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 ; }
Return the category totals for the search results.

@param Hit[]

@return array
Return the category totals for the search results .