You are here

public function SolrConnectorPluginBase::getTimeout in Search API Solr 8.2

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

Get the query timeout.

Parameters

\Solarium\Core\Client\Endpoint|NULL $endpoint:

Return value

int

Overrides SolrConnectorInterface::getTimeout

1 call to SolrConnectorPluginBase::getTimeout()
SolrConnectorPluginBase::adjustTimeout in src/SolrConnector/SolrConnectorPluginBase.php
Sets a new timeout for queries, but not for indexing or optimization.

File

src/SolrConnector/SolrConnectorPluginBase.php, line 927

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function getTimeout(Endpoint $endpoint = NULL) {
  $this
    ->connect();
  if (!$endpoint) {
    $endpoint = $this->solr
      ->getEndpoint('core');
  }
  return $endpoint
    ->getTimeout();
}