You are here

public function SolrConnectorPluginBase::execute 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::execute()
  2. 8.2 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::execute()
  3. 4.x src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::execute()

Executes any query.

Parameters

\Solarium\Core\Query\QueryInterface $query: The Solarium query object.

\Solarium\Core\Client\Endpoint|null $endpoint: (optional) The Solarium endpoint object.

Return value

\Solarium\Core\Query\Result\ResultInterface The Solarium result object.

Throws

\Drupal\search_api_solr\SearchApiSolrException

Overrides SolrConnectorInterface::execute

8 calls to SolrConnectorPluginBase::execute()
BasicAuthTestSolrCloudConnector::execute in tests/modules/search_api_solr_test/src/Plugin/SolrConnector/BasicAuthTestSolrCloudConnector.php
Executes any query.
BasicAuthTestSolrConnector::execute in tests/modules/search_api_solr_test/src/Plugin/SolrConnector/BasicAuthTestSolrConnector.php
Executes any query.
SolrConnectorPluginBase::extract in src/SolrConnector/SolrConnectorPluginBase.php
Executes an extract query.
SolrConnectorPluginBase::optimize in src/SolrConnector/SolrConnectorPluginBase.php
Optimizes the Solr index.
SolrConnectorPluginBase::restRequest in src/SolrConnector/SolrConnectorPluginBase.php
Sends a REST request to the Solr server endpoint and returns the result.

... See full list

2 methods override SolrConnectorPluginBase::execute()
BasicAuthTestSolrCloudConnector::execute in tests/modules/search_api_solr_test/src/Plugin/SolrConnector/BasicAuthTestSolrCloudConnector.php
Executes any query.
BasicAuthTestSolrConnector::execute in tests/modules/search_api_solr_test/src/Plugin/SolrConnector/BasicAuthTestSolrConnector.php
Executes any query.

File

src/SolrConnector/SolrConnectorPluginBase.php, line 852

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function execute(QueryInterface $query, ?Endpoint $endpoint = NULL) {
  $this
    ->connect();
  if (!$endpoint) {
    $endpoint = $this->solr
      ->getEndpoint();
  }
  try {
    return $this->solr
      ->execute($query, $endpoint);
  } catch (HttpException $e) {
    $this
      ->handleHttpException($e, $endpoint);
  }
}