You are here

function apachesolr_search_spellcheck_params in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6 apachesolr_search.module \apachesolr_search_spellcheck_params()
  2. 6.2 apachesolr_search.module \apachesolr_search_spellcheck_params()
1 call to apachesolr_search_spellcheck_params()
apachesolr_search_execute in ./apachesolr_search.module
Execute a search results based on keyword, filter, and sort strings.

File

./apachesolr_search.module, line 227
Provides a content search implementation for node content for use with the Apache Solr search application.

Code

function apachesolr_search_spellcheck_params($query) {
  $params = array();
  if (variable_get('apachesolr_search_spellcheck', FALSE)) {

    //Add new parameter to the search request
    $params['spellcheck.q'] = $query
      ->get_query_basic();
    $params['spellcheck'] = 'true';
  }
  return $params;
}