Knowledgebase

How to configure and manage the search settings in Drupal

The core Search module in Drupal adds a search function to your site. To manage the search settings click on the Configuration tab of your Drupal admin panel and on the page that is displayed click on Search settings. The page that opens is divided into several sections: Indexing Status, Indexing Throttle, Indexing Settings, Active Search Modules, Content Ranking. The Indexing Status section shows you how much of the site has been indexed. All content items (nodes) that you add to your site are indexed. This is performed by a cron job which runs automatically (every three hours by default). To change the interval at which the cron job is performed and to run the cron job manually, go to Configuration tab>Cron. On the page that opens you can use the drop-down menu to change the interval; to run the cron job manually just click on the Run cron button.

The Indexing Throttle section on the Search settings page let's you change the maximum number of items that can be indexed in one cron run. From the Indexing Settings sections you can change the length of the words that are indexed. By default, words that consist of at least three characters are indexed. From the Active Search Modules section you can set which parts of your site can be searched. By default, nodes and users can be searched. From the same section you can also set which is to be the default one. By default, when a search is executed on the frontend, the nodes are searched for the specified word(s). If you want to, you can change the default search to users. The Content Ranking section allows you to adjust which of the listed factors should have more weight when a search is performed. When you're done with the settings click on the Save configuration button.

By default, anonymous users/visitors don't have the permission to use the search function. Only registered users can do that. You can change that by editing the permission settings (People tab>Permissions sub-tab).

Drupal comes preconfigured with a Search form block which displays a search box on the frontend. With the Bartik theme it's displayed in the left column by default. The search page can also be used (yourdomain.com/search).

For more details and screenshots read the tutorial on managing the search settings in Drupal.

Was this answer helpful?

 Print this Article

Also Read