You are here

protected function SearchApiSolrAcquiaConnector::connect in Acquia Connector 8

4 calls to SearchApiSolrAcquiaConnector::connect()
SearchApiSolrAcquiaConnector::getExtractQuery in acquia_search/src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php
SearchApiSolrAcquiaConnector::getMoreLikeThisQuery in acquia_search/src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php
SearchApiSolrAcquiaConnector::getServerUri in acquia_search/src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php
SearchApiSolrAcquiaConnector::getUpdateQuery in acquia_search/src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php
Avoid providing an valid Update query if module determines this server should be locked down (as indicated by the overridden_by_acquia_search server option).

File

acquia_search/src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php, line 190

Class

SearchApiSolrAcquiaConnector
Acquia Search Plugin for Search API Solr.

Namespace

Drupal\acquia_search\Plugin\SolrConnector

Code

protected function connect() {
  if ($this->solr) {
    return;
  }
  $this->solr = new Client(new Http(), $this->eventDispatcher);

  // Scheme should always be https and port 443.
  $this->configuration['scheme'] = 'https';
  $this->configuration['port'] = 443;
  $this->configuration['key'] = 'core';
  $this->configuration['path'] = '/';
  $this->configuration[self::QUERY_TIMEOUT] = $this->configuration['timeout'];
  $this->solr
    ->createEndpoint($this->configuration, TRUE);
  $this->solr
    ->registerPlugin('acquia_search_subscriber', $this->searchSubscriber);
}