You are here

function apachesolr_search_build_spellcheck in Apache Solr Search 6.2

Same name and namespace in other branches
  1. 8 apachesolr_search.module \apachesolr_search_build_spellcheck()
  2. 5.2 apachesolr_search.module \apachesolr_search_build_spellcheck()
  3. 6.3 apachesolr_search.module \apachesolr_search_build_spellcheck()
  4. 6 apachesolr_search.module \apachesolr_search_build_spellcheck()
  5. 7 apachesolr_search.module \apachesolr_search_build_spellcheck()
2 string references to 'apachesolr_search_build_spellcheck'
apachesolr_search_form_apachesolr_delete_index_form_alter in ./apachesolr_search.module
Implementation of hook_form_[form_id]_alter().
apachesolr_search_form_apachesolr_settings_alter in ./apachesolr_search.module
Implementation of hook_form_[form_id]_alter().

File

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

Code

function apachesolr_search_build_spellcheck() {
  try {
    $solr = apachesolr_get_solr();
    $params['spellcheck'] = 'true';
    $params['spellcheck.build'] = 'true';
    $response = $solr
      ->search('solr', 0, 0, $params);
  } catch (Exception $e) {
    watchdog('Apache Solr', nl2br(check_plain($e
      ->getMessage())), NULL, WATCHDOG_ERROR);
  }
}