A snippet of code that will automatically redirect searches that would display only one search result so that they do not show the search results page but instead immediately and automatically redirect to the first result.
To use it, add it to your active theme's template.php file and replace themename with the name of your theme.
function themename_search_page($results, $type)
{
if ('node' == $type && 1 == count($results))
{
$item = current($results);
drupal_goto($item['link']);
}
else
return theme_search_page($results, $type);
}

Usefull but usable on terms ?
Thanks for this usefull snippet of code but I'm looking for a module or snippet of code
doing the same thing for single node result for a given term.
For example, I have a term containing only 1 content. Could I redirect the user
directly on that content to prevent the user from only having a list of 1 content,
and making that user clicking to access to the whole content...
An idea ? Thanks for your help, I browsed the net for a long time now to find
a module or snippet of code but never found that !
Steeve