public function ping($useCache = true)
    {
        $solrAvailable = false;

        try {
            if (!$this->solr->getReadService()->ping($useCache)) {
                throw new \Exception('Solr Server not responding.', 1237475791);
            }

            $solrAvailable = true;
        } catch (\Exception $e) {
            if ($this->configuration->getLoggingExceptions()) {
                $this->logger->log(
                    SolrLogManager::ERROR,
                    'Exception while trying to ping the solr server',
                    [
                        $e->__toString()
                    ]
                );
            }
        }

        return $solrAvailable;
    }
public function ping($useCache = true)
    {
        $solrAvailable = false;

        try {
            if (!$this->solr->getReadService()->ping($useCache)) {
                throw new \Exception('Solr Server not responding.', 1237475791);
            }

            $solrAvailable = true;
        } catch (\Exception $e) {
            if ($this->configuration->getLoggingExceptions()) {
                $this->logger->log(
                    SolrLogManager::ERROR,
                    'Exception while trying to ping the solr server',
                    [
                        $e->__toString()
                    ]
                );
            }
        }

        return $solrAvailable;
    }
public function ping ( $ useCache = true ) { $ solrAvailable = false ; try { if ( ! $ this -> solr -> getReadService ( ) -> ping ( $ useCache ) ) { throw new \ Exception ( 'Solr Server not responding.' , 1237475791 ) ; } $ solrAvailable = true ; } catch ( \ Exception $ e ) { if ( $ this -> configuration -> getLoggingExceptions ( ) ) { $ this -> logger -> log ( SolrLogManager :: ERROR , 'Exception while trying to ping the solr server' , [ $ e -> __toString ( ) ] ) ; } } return $ solrAvailable ; }
Sends a ping to the solr server to see whether it is available.

@param bool $useCache Set to true if the cache should be used.
@return bool Returns TRUE on successful ping.
@throws \Exception Throws an exception in case ping was not successful.
Sends a ping to the solr server to see whether it is available .