You are here

function apachesolr_search_add_spellcheck_params in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr_search.module \apachesolr_search_add_spellcheck_params()
  2. 6.3 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 1205
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);
}