Index: search.admin.inc =================================================================== --- search.admin.inc (revision 410) +++ search.admin.inc (working copy) @@ -61,6 +61,9 @@ $form['indexing_settings']['info'] = array('#value' => t('
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' => variable_get('minimum_word_size', 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' => variable_get('overlap_cjk', 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.')); + // Searching Logging: + $form['searching_logging'] = array('#type' => 'fieldset', '#title' => t('Searching Logging')); + $form['searching_logging']['search_log_searches_to_watchdog'] = array('#type' => 'checkbox', '#title' => t('Log searches to watchdog'), '#default_value' => variable_get('search_log_searches_to_watchdog', 0), '#description' => t('If checked all searches will be logged to watchdog.')); $form['#validate'] = array('search_admin_settings_validate'); Index: search.pages.inc =================================================================== --- search.pages.inc (revision 410) +++ search.pages.inc (working copy) @@ -25,8 +25,10 @@ // Only perform search if there is non-whitespace search term: $results = ''; if (trim($keys)) { - // Log the search keys: - watchdog('search', '%keys (@type).', array('%keys' => $keys, '@type' => module_invoke($type, 'search', 'name')), WATCHDOG_NOTICE, l(t('results'), 'search/'. $type .'/'. $keys)); + if (variable_get('search_log_searches_to_watchdog', 0)) { + // Log the search keys: + watchdog('search', '%keys (@type).', array('%keys' => $keys, '@type' => module_invoke($type, 'search', 'name')), WATCHDOG_NOTICE, l(t('results'), 'search/'. $type .'/'. $keys)); + } // Collect the search results: $results = search_data($keys, $type);