public function SearchApiSolrBackend::alterSpellcheckAutocompleteQuery in Search API Solr 8.2
Allow custom changes to the Solarium Spellcheck autocomplete query.
This is an object oriented equivalent to hook_search_api_solr_spellcheck_autocomplete_query_alter() to avoid that any logic needs to be split between the backend class and a module file.
Parameters
\Drupal\search_api_solr\Solarium\Autocomplete\Query $solarium_query: The Solarium query object, as generated from the Search API query.
\Drupal\search_api\Query\QueryInterface $query: The Search API query object representing the executed search query.
Overrides SolrAutocompleteInterface::alterSpellcheckAutocompleteQuery
See also
1 call to SearchApiSolrBackend::alterSpellcheckAutocompleteQuery()
- SearchApiSolrBackend::getSpellcheckSuggestions in src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php - Autocompletion suggestions for some user input using Spellcheck component.
File
- src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php, line 2570
Class
- SearchApiSolrBackend
- Apache Solr backend for search api.
Namespace
Drupal\search_api_solr\Plugin\search_api\backendCode
public function alterSpellcheckAutocompleteQuery(AutocompleteQuery $solarium_query, QueryInterface $query) {
// Allow modules to alter the solarium autocomplete query.
$this->moduleHandler
->alter('search_api_solr_spellcheck_autocomplete_query', $solarium_query, $query);
}