You are here

public function SearchApiSolrBackend::getSolrConnector in Search API Solr 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getSolrConnector()
  2. 8.2 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getSolrConnector()
  3. 4.x src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getSolrConnector()

Returns the Solr connector used for this backend.

Return value

\Drupal\search_api_solr\SolrConnectorInterface

Throws

\Drupal\search_api\SearchApiException

Overrides SolrBackendInterface::getSolrConnector

14 calls to SearchApiSolrBackend::getSolrConnector()
SearchApiSolrBackend::applySearchWorkarounds in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Apply workarounds for special Solr versions before searching.
SearchApiSolrBackend::calculateDependencies in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Calculates dependencies for the configured plugin.
SearchApiSolrBackend::deleteAllIndexItems in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Deletes all the items from the index.
SearchApiSolrBackend::deleteItems in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Deletes the specified items from the index.
SearchApiSolrBackend::extractContentFromFile in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Extract a file's content using tika within a solr server.

... See full list

File

src/Plugin/search_api/backend/SearchApiSolrBackend.php, line 438

Class

SearchApiSolrBackend
Apache Solr backend for search api.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

public function getSolrConnector() {
  if (!$this->solrConnector) {
    if (!($this->solrConnector = $this->solrConnectorPluginManager
      ->createInstance($this->configuration['connector'], $this->configuration['connector_config']))) {
      throw new SearchApiException("The Solr Connector with ID '{$this->configuration}['connector']' could not be retrieved.");
    }
  }
  return $this->solrConnector;
}