You are here

public static function AcquiaSearchSolrEnvironment::pingWithAuthCheck in Acquia Connector 7.3

Ping the Solr index to ensure authentication is working.

Parameters

string $env_id: Search environment ID.

Return value

bool TRUE if ping successful, otherwise - FALSE.

1 call to AcquiaSearchSolrEnvironment::pingWithAuthCheck()
AcquiaSearchSolrMessages::getSearchStatusMessage in acquia_search/includes/AcquiaSearchSolrMessages.php
Returns connection status message for search environment.

File

acquia_search/includes/AcquiaSearchSolrEnvironment.php, line 159

Class

AcquiaSearchSolrEnvironment
Class AcquiaSearchSolrEnvironment.

Code

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