protected function Database::preQuery in Search API 8
Preprocesses a search's database query before it is executed.
This allows subclasses to alter the DB query before a count query (or facet queries, or other related queries) are constructed from it.
Parameters
\Drupal\Core\Database\Query\SelectInterface $db_query: The database query to be executed for the search. Will have "item_id" and "score" columns in its result.
\Drupal\search_api\Query\QueryInterface $query: The search query that is being executed.
See also
hook_search_api_db_query_alter()
1 call to Database::preQuery()
- Database::createDbQuery in modules/
search_api_db/ src/ Plugin/ search_api/ backend/ Database.php - Creates a database query for a search.
File
- modules/
search_api_db/ src/ Plugin/ search_api/ backend/ Database.php, line 2373
Class
- Database
- Indexes and searches items using the database.
Namespace
Drupal\search_api_db\Plugin\search_api\backendCode
protected function preQuery(SelectInterface &$db_query, QueryInterface $query) {
}