function hook_search_api_solr_multi_query_alter in Search API Solr 7
Lets modules alter a Solr search request for a multi-index search.
SearchApiSolrConnectionInterface::search() is called afterwards with these parameters. Please see this method for details on what should be altered where and what is set afterwards.
Parameters
array $call_args: An associative array containing all three arguments to the SearchApiSolrConnectionInterface::search() call ("query", "params" and "method") as references.
SearchApiMultiQueryInterface $query: The object representing the executed search query.
1 invocation of hook_search_api_solr_multi_query_alter()
- SearchApiSolrService::searchMultiple in includes/
service.inc - Implements SearchApiMultiServiceInterface::searchMultiple().
File
- ./
search_api_solr.api.php, line 97 - Hooks provided by the Search API Solr search module.
Code
function hook_search_api_solr_multi_query_alter(array &$call_args, SearchApiMultiQueryInterface $query) {
if ($query
->getOption('foobar')) {
$call_args['params']['foo'] = 'bar';
}
}