function apachesolr_search_add_spellcheck_params in Apache Solr Search 8
Same name and namespace in other branches
- 6.3 apachesolr_search.module \apachesolr_search_add_spellcheck_params()
- 7 apachesolr_search.module \apachesolr_search_add_spellcheck_params()
1 call to apachesolr_search_add_spellcheck_params()
- apachesolr_search_run in ./
apachesolr_search.module - Execute a search results based on keyword, filter, and sort strings.
File
- ./
apachesolr_search.module, line 1160 - Provides a content search implementation for node content for use with the Apache Solr search application.
Code
function apachesolr_search_add_spellcheck_params(DrupalSolrQueryInterface $query) {
$params = array();
// Add new parameter to the search request
$params['spellcheck.q'] = $query
->getParam('q');
$params['spellcheck'] = 'true';
$query
->addParams($params);
}