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 the Search module, so this must be enabled for all of the search features to work.
There are two 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. In that case, you may wish to 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 |
---|---|---|
hook_search_preprocess | core/modules/search/search.api.php | Preprocess text for search. |
search_excerpt | core/modules/search/search.module | Returns snippets from a piece of text, with search keywords highlighted. |
search_index | core/modules/search/search.module | Updates the full-text search index for a particular item. |
Name | Location | Description |
---|---|---|
SearchPlugin | core/modules/search/src/Annotation/SearchPlugin.php | Defines a SearchPlugin type annotation object. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!search!search.module/group/search/8.1.x