You are here

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

10 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.
Solr36TestConnector::execute in modules/search_api_solr_legacy/tests/modules/search_api_solr_legacy_test/src/Plugin/SolrConnector/Solr36TestConnector.php
Executes any query.
SolrConnectorPluginBase::autocomplete in src/SolrConnector/SolrConnectorPluginBase.php
Executes a search query and returns the raw response.
SolrConnectorPluginBase::extract in src/SolrConnector/SolrConnectorPluginBase.php
Executes an extract query.

... See full list

3 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.
Solr36TestConnector::execute in modules/search_api_solr_legacy/tests/modules/search_api_solr_legacy_test/src/Plugin/SolrConnector/Solr36TestConnector.php
Executes any query.

File

src/SolrConnector/SolrConnectorPluginBase.php, line 949

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