Adding Search Capabilities
Doug tested the website with a few friends and family members, and their main
issue with it was the diffi culty in fi nding products they wanted.
The first thing we need to do is install the Search module, which is grouped
under the Core - optional section of Modules in the Administer area.
With the module installed, we now need to enable the Search feature from the
Blocks section; otherwise the search box won't be displayed on the website. We
can select this feature by going to Administer | Site Building | Blocks, then
set it up in the same way as for the shopping cart and save the settings.
We now have a search box on our website under the header but above the main
menu!
Let's try searching for one of our products, for instance T-Rex. Notice
something? No results found! This seems quite strange as we have a product with
T-Rex in the name, so why didn't we get any results?
The reason for this is that Drupal has not yet been indexed. Drupal uses a cron
job to create the index of the site. Without the indexing done Search options
cannot work. The Search settings under Administer | Site confi guration allow
us to specify how many pages are indexed per "cron run" and allow us to set the
site to be re-indexed.
|