You are here

public static function AcquiaSearchSolrEnvironment::ping in Acquia Connector 7.3

Ping search index.

Parameters

string $env_id: Search environment ID.

Return value

bool TRUE if ping successful, otherwise - FALSE.

2 calls to AcquiaSearchSolrEnvironment::ping()
AcquiaSearchSolrEnvironment::isConnected in acquia_search/includes/AcquiaSearchSolrEnvironment.php
Checks connection to search index.
AcquiaSearchSolrMessages::getSearchStatusMessage in acquia_search/includes/AcquiaSearchSolrMessages.php
Returns connection status message for search environment.

File

acquia_search/includes/AcquiaSearchSolrEnvironment.php, line 139

Class

AcquiaSearchSolrEnvironment
Class AcquiaSearchSolrEnvironment.

Code

public static function ping($env_id) {
  try {
    return (bool) apachesolr_get_solr($env_id)
      ->ping();
  } catch (Exception $exception) {
    watchdog_exception('acquia_search_solr', $exception);
  }
  return FALSE;
}