protected function initializeSolrConnection()
    {
        $solr = GeneralUtility::makeInstance(ConnectionManager::class)->getConnectionByPageId($this->page->id, $this->page->sys_language_uid);

        // do not continue if no server is available
        if (!$solr->getWriteService()->ping()) {
            throw new \Exception(
                'No Solr instance available while trying to index a page.',
                1234790825
            );
        }

        $this->solrConnection = $solr;
    }
protected function initializeSolrConnection()
    {
        $solr = GeneralUtility::makeInstance(ConnectionManager::class)->getConnectionByPageId($this->page->id, $this->page->sys_language_uid);

        // do not continue if no server is available
        if (!$solr->getWriteService()->ping()) {
            throw new \Exception(
                'No Solr instance available while trying to index a page.',
                1234790825
            );
        }

        $this->solrConnection = $solr;
    }
protected function initializeSolrConnection ( ) { $ solr = GeneralUtility :: makeInstance ( ConnectionManager :: class ) -> getConnectionByPageId ( $ this -> page -> id , $ this -> page -> sys_language_uid ) ; // do not continue if no server is available if ( ! $ solr -> getWriteService ( ) -> ping ( ) ) { throw new \ Exception ( 'No Solr instance available while trying to index a page.' , 1234790825 ) ; } $ this -> solrConnection = $ solr ; }
Initializes the Solr server connection.

@throws    \Exception when no Solr connection can be established.
Initializes the Solr server connection .