You are here

protected function SolrConnectorPluginBase::connect in Search API Solr 8.3

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

Prepares the connection to the Solr server.

32 calls to SolrConnectorPluginBase::connect()
SolrConnectorPluginBase::adjustTimeout in src/SolrConnector/SolrConnectorPluginBase.php
Sets a new timeout for queries, but not for indexing or optimization.
SolrConnectorPluginBase::createEndpoint in src/SolrConnector/SolrConnectorPluginBase.php
Creates an endpoint.
SolrConnectorPluginBase::customizeRequest in src/SolrConnector/SolrConnectorPluginBase.php
Creates a CustomizeRequest object.
SolrConnectorPluginBase::execute in src/SolrConnector/SolrConnectorPluginBase.php
Executes any query.
SolrConnectorPluginBase::executeRequest in src/SolrConnector/SolrConnectorPluginBase.php
Executes a request and returns the response.

... See full list

File

src/SolrConnector/SolrConnectorPluginBase.php, line 330

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

protected function connect() {
  if (!$this->solr) {
    $configuration = $this->configuration;
    $this->solr = $this
      ->createClient($configuration);
    $this->solr
      ->createEndpoint($configuration + [
      'key' => 'search_api_solr',
    ], TRUE);
  }
}