You are here

public function StandardSolrCloudConnector::getConfigSetName in Search API Solr 4.x

Gets the name of the used configset.

Return value

string|null Configset name.

Overrides SolrConnectorPluginBase::getConfigSetName

File

src/Plugin/SolrConnector/StandardSolrCloudConnector.php, line 221

Class

StandardSolrCloudConnector
Standard Solr Cloud connector.

Namespace

Drupal\search_api_solr\Plugin\SolrConnector

Code

public function getConfigSetName() : ?string {
  try {
    if ($clusterState = $this
      ->getClusterStatus()) {
      return $clusterState
        ->getCollectionState($this->configuration['core'])
        ->getConfigName();
    }
  } catch (\Exception $e) {
    $this
      ->getLogger()
      ->debug($e
      ->getMessage());
  }
  return NULL;
}