search.module

Version 1.328 (checked in on 2009/12/06 at 17:31:49 by webchick)

Enables site-wide keyword searching.

Constants

NameDescription
PREG_CLASS_CJKMatches all CJK characters that are candidates for auto-splitting (Chinese, Japanese, Korean). Contains kana and BMP ideographs.
PREG_CLASS_NUMBERSMatches all 'N' Unicode character classes (numbers)
PREG_CLASS_PUNCTUATIONMatches all 'P' Unicode character classes (punctuation)
PREG_CLASS_SEARCH_EXCLUDEMatches Unicode character classes to exclude from the search index.

Functions

NameDescription
search_block_infoImplements hook_block_info().
search_block_viewImplements hook_block_view().
search_boxForm builder; Output a search form for the search block's search box.
search_box_form_submitProcess a block search form submission.
search_comment_deleteImplements hook_comment_delete().
search_comment_insertImplements hook_comment_insert().
search_comment_publishImplements hook_comment_publish().
search_comment_unpublishImplements hook_comment_unpublish().
search_comment_updateImplements hook_comment_update().
search_cronImplements hook_cron().
search_dataPerform a standard search on the given keys, and return the formatted results.
search_dirtyMarks a word as dirty (or retrieves the list of dirty words). This is used during indexing (cron). Words which are dirty have outdated total counts in the search_total table, and need to be recounted.
search_excerptReturns snippets from a piece of text, with certain keywords highlighted. Used for formatting search results.
search_expand_cjkBasic CJK tokenizer. Simply splits a string into consecutive, overlapping sequences of characters ('minimum_word_size' long).
search_expression_extractExtract a module-specific search option from a search query. e.g. 'type:book'
search_expression_insertReturn a query with the given module-specific search option inserted in. e.g. 'type:book'.
search_formRender a search form.
search_forms
search_get_infoGet information about all available search hooks.
search_get_keysHelper function for grabbing search keys.
search_helpImplements hook_help().
search_indexUpdate the full-text search index for a particular item.
search_index_splitSplits a string into tokens for indexing.
search_invoke_preprocessInvokes hook_search_preprocess() in modules.
search_menuImplements hook_menu().
search_node_updateImplements hook_node_update().
search_node_update_indexImplements hook_node_update_index().
search_permissionImplements hook_permission().
search_reindexWipes a part of or the entire search index.
search_simplifySimplifies a string according to indexing rules.
search_themeImplements hook_theme().
search_touch_nodeChange a node's changed timestamp to 'now' to force reindexing.
search_update_totalsThis function is called on shutdown to ensure that search_total is always up to date (even if cron times out or otherwise fails).
template_preprocess_search_block_formProcess variables for search-block-form.tpl.php.
_search_excerpt_replaceHelper function for array_walk in search_except.
_search_index_truncateHelper function for array_walk in search_index_split.
_search_menu_accessAccess callback for search tabs.
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.