Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.
The default settings should be appropriate for the majority of sites.
') ); $form['indexing_settings']['minimum_word_size'] = array( '#type' => 'textfield', '#title' => t('Minimum word length to index'), '#default_value' => 3, '#size' => 5, '#maxlength' => 3, '#description' => t('The number of characters a word has to be to be indexed. A lower setting means better search result ranking, but also a larger database. Each search query must contain at least one keyword that is this size (or longer).') ); $form['indexing_settings']['overlap_cjk'] = array( '#type' => 'checkbox', '#title' => t('Simple CJK handling'), '#default_value' => TRUE, '#description' => t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.') ); $form['#submit'][] = 'search_admin_settings_submit'; // Per module settings $form = array_merge($form, module_invoke_all('search', 'admin')); return system_settings_form($form, TRUE); } /** * Submit callback. */ function search_admin_settings_submit($form, &$form_state) { // If these settings change, the index needs to be rebuilt. if ((variable_get('minimum_word_size', 3) != $form_state['values']['minimum_word_size']) || (variable_get('overlap_cjk', TRUE) != $form_state['values']['overlap_cjk'])) { drupal_set_message(t('The index will be rebuilt.')); search_reindex(); } } /** * Submit callback. */ function search_admin_reindex_submit($form, &$form_state) { // send the user to the confirmation page $form_state['redirect'] = 'admin/settings/search/reindex'; }