There are several options for implementing Search on a Drupal site:
1. Core search functionality - easy to implement but limited functionality
2. Google Custom Search module - Google managed search
3. Apache Solr Search - High performance full text search requiring a separate Java server.
Requires installing the Solr Search Module: http://drupal.org/project/apachesolr .
Once you have your Solr server up and running, and have configured it to work with Drupal at /admin/settings/apachesolr, you must configure the Drupal Search Form to work with Solr as follows:
<?php
/**
* Implementation of hook_form_alter()
*/
function your_custom_module_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'search_theme_form') {
$form['#submit'][] = 'your_custom_module_search_submit';
}
}
/**
* Re-direct Search Form Submit
*/
function your_custom_module_search_submit($form, &$form_state) {
$form_id = $form['form_id']['#value'];
$form_state['redirect']='search/apachesolr_search/'. trim($form_state['values'][$form_id]);
}
?>