This article does not get into technical details or provide step by step guidance on how search with Drupal. It's goal is to provide guidelines to start from when looking for a suitable search solution.

Drupal offers a few options to search on your website. Your choice depends much on your site size and on what functionality you need.

While there are many other modules the following options may be considered as main search solutions.

1. Core Search

Drupal comes with a core module for search.
This is suitable for small sites where a simple word search is enough. The way it works is by indexing words from nodes.

There are no extra filters to refine your search by default.
If you want some basic filters like content type or taxonomy filtering you could use the Custom Search module: http://drupal.org/project/custom_search

2. Search with Views

Views module can be used as a website search. The plus you get from the standard drupal search is that you can have any extra filters using the default views filtering system, and customize it at your wish. This will give you more flexibility then the Custom Search module combined with core search.

You can also have multiple search inputs to mach specific fields. If you want to replicate the core search you will have to use a filter called "Global: Combine fields filter" to search on a single input to more fields at once.

This is suitable for small/medium site sizes. While Views is a good module, when dealing with a large number of nodes, or searching on a large number of fields you should expect search to be slow.

A solution to be considered is enabling caching from Views. That will however not be an option for sites like shops where product quantity, price or description update is critic.

3. Search API

Search API module is a framework for easily creating searches.
Along with the API it also provides Search Views and Search facets modules.
http://drupal.org/project/search_api

In order to actually get a working search page with this module you will need to implement other modules/functionality that do the indexing.

Small sites

On small sites you might consider using Search API Database Search http://drupal.org/project/search_api_db

This module will use database tables to index your content.
Then you use Views to display it. When Search API is installed, a new type of view is available in Views to search in the indexed content.

Large sites

When you have a huge site and you want to externalize searching to save resources or to simply speed things up, you will want to setup this module to use Solr search.
You can either setup the Apache Solr search on your dedicated server as a separate service, or use a 3rd party provider for this.

You will have to install the Search API Solr search module that provides the Solr back-end for the Search API module.
http://drupal.org/project/search_api_solr

Even if this is not as easy to configure as a simple Views search page, it will be worth investing time to setup this solution when searching becomes a problem on your website.

Tags: 
search