You are here

public function SolrConnectorPluginBase::createEndpoint in Search API Solr 8.3

Same name and namespace in other branches
  1. 4.x src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::createEndpoint()

Creates an endpoint.

Parameters

string $key: The endpoint ID.

array $additional_configuration: Configuration in addtion to the default configuration.

Return value

\Solarium\Core\Client\Endpoint The Solarium endpoint object.

Overrides SolrConnectorInterface::createEndpoint

1 call to SolrConnectorPluginBase::createEndpoint()
StandardSolrCloudConnector::getCheckpointsCollectionEndpoint in src/Plugin/SolrConnector/StandardSolrCloudConnector.php
Returns the Solr collection endpoint used to store topic checkpoints.

File

src/SolrConnector/SolrConnectorPluginBase.php, line 1060

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function createEndpoint(string $key, array $additional_configuration = []) {
  $this
    ->connect();
  $configuration = [
    'key' => $key,
    self::QUERY_TIMEOUT => $this->configuration['timeout'],
  ] + $additional_configuration + $this->configuration;
  if (Client::checkMinimal('5.2.0')) {
    unset($configuration['timeout']);
  }
  return $this->solr
    ->createEndpoint($configuration, TRUE);
}