Core search, when only one result, open result
As I see the only way is use hook menu alter for this item

/**
 * Implements hook_menu().
 */
function search_menu() {
  $items['search'] = array(
    'title' =&gt; 'Search',
    'page callback' =&gt; 'search_view',
    'access callback' =&gt; 'search_is_active',
    'type' =&gt; MENU_SUGGESTED_ITEM,
    'file' =&gt; 'search.pages.inc',
  );


I propose to replace page callback "search_view" to your own and put there your logic.