The Drupal search interface manages a global search mechanism.
Modules may plug into this system to provide searches of different types of data. Most of the system is handled by search.module, so this must be enabled for all of the search features to work.
There are three ways to interact with the search system:
If your module needs to provide a more complicated search form, then you need to implement it yourself without hook_search(). In that case, you should define it as a local task (tab) under the /search page (e.g. /search/mymodule) so that users can easily find it.
|do_search||Do a query on the full-text search index for a word or words.|
|hook_search||Define a custom search routine.|
|hook_update_index||Update Drupal's full-text index for this module.|
|search_box||Output a search form for the search block and the theme's search box.|
|search_box_form_submit||Process a block search form submission.|
|search_data||Perform a standard search on the given keys, and return the formatted results.|
|search_excerpt||Returns snippets from a piece of text, with certain keywords highlighted. Used for formatting search results.|
|search_form||Render a search form.|
|search_form_submit||Process a search form submission.|
|search_form_validate||As the search form collates keys from other modules hooked in via hook_form_alter, the validation takes place in _submit. search_form_validate() is used solely to set the 'processed_keys' form value for the basic search form.|
|search_index||Update the full-text search index for a particular item.|
|theme_search_block_form||Theme the block search form.|
|theme_search_theme_form||Theme the theme search form.|