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_info(). 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.
Name | Location | Description |
---|---|---|
template_preprocess_search_block_form |
drupal/ |
Process variables for search-block-form.tpl.php. |
search_index |
drupal/ |
Update the full-text search index for a particular item. |
search_form |
drupal/ |
Builds a search form. |
search_excerpt |
drupal/ |
Returns snippets from a piece of text, with certain keywords highlighted. Used for formatting search results. |
search_data |
drupal/ |
Performs a search by calling hook_search_execute(). |
search_box_form_submit |
drupal/ |
Process a block search form submission. |
search_box |
drupal/ |
Form builder; Output a search form for the search block's search box. |
hook_update_index |
drupal/ |
Update the search index for this module. |
hook_search_status |
drupal/ |
Report the status of indexing. |
hook_search_reset |
drupal/ |
Take action when the search index is going to be rebuilt. |
hook_search_preprocess |
drupal/ |
Preprocess text for search. |
hook_search_info |
drupal/ |
Define a custom search type. |
hook_search_execute |
drupal/ |
Execute a search for a set of key words. |
hook_search_admin |
drupal/ |
Add elements to the search settings form. |
hook_search_access |
drupal/ |
Define access to a custom search routine. |
callback_search_conditions |
drupal/ |
Provide search query conditions. |