You are here

protected function AbstractSearchApiSolrMultilingualBackend::postQuery in Search API Solr 8.2

Allow custom changes before search results are returned for subclasses.

Works exactly like hook_search_api_solr_search_results_alter().

Parameters

\Drupal\search_api\Query\ResultSetInterface $results: The results array that will be returned for the search.

\Drupal\search_api\Query\QueryInterface $query: The \Drupal\search_api\Query\Query object representing the executed search query.

object $response: The response object returned by Solr.

Overrides SearchApiSolrBackend::postQuery

File

src/Plugin/search_api/backend/AbstractSearchApiSolrMultilingualBackend.php, line 443

Class

AbstractSearchApiSolrMultilingualBackend
A abstract base class for all multilingual Solr Search API backends.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

protected function postQuery(ResultSetInterface $results, QueryInterface $query, $response) {
  if ($this->origKeys) {
    $query
      ->keys($this->origKeys);
  }
  parent::postQuery($results, $query, $response);
}