You are here

public function SolrConnectorPluginBase::pingServer in Search API Solr 8.2

Same name and namespace in other branches
  1. 8.3 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::pingServer()
  2. 8 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::pingServer()
  3. 4.x src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::pingServer()

Pings the Solr server to tell whether it can be accessed.

Return value

mixed The latency in milliseconds if the core can be accessed, otherwise FALSE.

Overrides SolrConnectorInterface::pingServer

File

src/SolrConnector/SolrConnectorPluginBase.php, line 499

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function pingServer() {
  return $this
    ->doPing([
    'handler' => 'admin/info/system',
  ], 'server');
}