This tutorial is going to show you how to enable and manage search on your Drupal 7 site.
- Log into your Drupal admin panel and go to the Modules top menu.
- Check the one called Search (Enables site-wide keyword searching) under the Core section, scroll down and click Save Configuration.
- Then go to the top menu Structure, click Blocks and look for the one called Search form.
- Under the Region column you need to choose the region for your block. You need to refer to the documentation file that comes with your template to find out which region to choose.
- Click on Configure under the Operations column. Under the Region Settings you will see the same position selected in the default theme. There you can also select the positions of this module for the administration and other themes you have on your site.
- Under the Visibility settings -> Show block on specific pages you need to specify what pages are going to have this module one, e.g. All pages except those listed
- When you are done, click Save Block. Now you should see the Search block on your site.
- The search engine maintains an index of words found in your site’s content. To build and maintain this index, a correctly configured is required. Indexing behavior can be adjusted if you go to the top menu Configuration and from there click Search Settings under Search and metadata.
- Indexing status shows you how much of your site has been indexed and is, therefore, available for searching. To re-index your site, click the Re-index site button; the system dumps the old index is going to be dumped by the system and a new one will be created.
- Indexing throttle allows you to specify the number of items to be indexed with each cron run. The larger the length of a typical node, comment, or piece of content, the more memory and resources Drupal will need to analyze it.
- Indexing settings gives you two controls. The first specifies the minimum word length to index (the default value of 3 is enough, which means the words at, be, do, no, and we would not be indexed). The other option, Simple CJK handling, is needed for sites using the Chinese, Korean, or Japanese language. If your site has no content in those languages, feel free to disable it.
- Active Search Modules.
The first check boxes allow you to specify the type of content the site users are able to search. Choose Node to search the content items. Choose User to search the user profiles (by default the both are enabled). Note that while the Drupal site search can be configured to search both nodes and users, the search results output always divides the results in separate tabs, one labeled Content and the other labeled Users; the output on those tabs corresponds to the Node and User configuration setting. The Default search module setting allows you to set the default search results tab that users will see. Select Node (the default option) to make the Content tab appear first. Select User to display the Users tab first.
- Content ranking
Allows you to modify the order in which results are returned during a search process, and help direct Drupal to what is relevant to your users. A higher number means higher relevancy. The example below would cause content promoted to the frontpage to be returned higher in the search results than other content with a high number of user comments, even though content that has been commented on would still appear higher than content that only contains the keyword. Note that modules can add additional content ranking factors allowing you to fi ne tune your search results. For example, the core Statistics module adds a ranking item for the number of views. Set this order to what you believe is relevant for the search patterns on your website. For modifying the content ranking no re-indexing is required.
Feel free to check the detailed video tutorial below: