You are here

protected function SolrConnectorPluginBase::connect in Search API Solr 4.x

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

Prepares the connection to the Solr server.

37 calls to SolrConnectorPluginBase::connect()
SolrConnectorPluginBase::adjustTimeout in src/SolrConnector/SolrConnectorPluginBase.php
Sets a new timeout for queries, but not for indexing or optimization.
SolrConnectorPluginBase::autocomplete in src/SolrConnector/SolrConnectorPluginBase.php
Executes a search query and returns the raw response.
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.

... See full list

File

src/SolrConnector/SolrConnectorPluginBase.php, line 347

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);
  }
}