protected function SolrBackendTestBase::executeQueryWithoutPostProcessing in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 tests/src/Kernel/SolrBackendTestBase.php \Drupal\Tests\search_api_solr\Kernel\SolrBackendTestBase::executeQueryWithoutPostProcessing()
- 8.2 tests/src/Kernel/SolrBackendTestBase.php \Drupal\Tests\search_api_solr\Kernel\SolrBackendTestBase::executeQueryWithoutPostProcessing()
Executes a query and skips search_api post processing of results.
A light weight alternative to $query->execute() if we don't want to get heavy weight search_api results here, but more or less raw solr results. The data as it is returned by Solr could be accessed by calling getExtraData('search_api_solr_response') on the result set returned here.
Parameters
\Drupal\search_api\Query\QueryInterface $query: The query to be executed.
Return value
\Drupal\search_api\Query\ResultSetInterface The results of the search.
File
- tests/
src/ Kernel/ SolrBackendTestBase.php, line 138
Class
- SolrBackendTestBase
- Tests location searches and distance facets using the Solr search backend.
Namespace
Drupal\Tests\search_api_solr\KernelCode
protected function executeQueryWithoutPostProcessing(QueryInterface $query) {
/** @var \Drupal\search_api\IndexInterface $index */
$index = Index::load($this->indexId);
$query
->preExecute();
return $index
->getServerInstance()
->search($query);
}