You are here

public function Index::preprocessSearchQuery in Search API 8

Preprocesses a search query.

Lets all enabled processors for this index preprocess the search query.

Parameters

\Drupal\search_api\Query\QueryInterface $query: The search query to be executed.

Overrides IndexInterface::preprocessSearchQuery

File

src/Entity/Index.php, line 664

Class

Index
Defines the search index configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function preprocessSearchQuery(QueryInterface $query) {
  foreach ($this
    ->getProcessorsByStage(ProcessorInterface::STAGE_PREPROCESS_QUERY) as $processor) {
    $processor
      ->preprocessSearchQuery($query);
  }
}