protected function SearchApiSolrTest::executeQueryWithoutPostProcessing in Search API Solr 8
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
File
- tests/
src/ Kernel/ SearchApiSolrTest.php, line 118
Class
- SearchApiSolrTest
- Tests index and search capabilities 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);
}