How to hook into Drupal 6 search process? I need to modify the search results drupal generates to include selected content from some other D6 sister sites.  hook_search seemed like the obvious choice, but when I implement it, it's never invoked with the keywords I'm searching for:

function nmc_xsearch_search( $op = 'search', $keys = NULL ) {

    switch ($op) {

        case 'name':
            return t('Content');
            return $form;

        case 'search':    
            dsm( "Operation: $op | Keys: $keys" );        
                return $results;
    }
}


When I walk through this code in the debugger, my function nmc_xsearch_search() is hit twice.  The first time $op = 'name' and $keys = null.  The second time $op = 'name' and $keys = '1'. 

When I put a breakpoint on node_search it is invoked four times - all before my nmc_xsearch_search() is hit.  The last time node_search is hit the provided parameters are: $op = 'search' and $keys = 'my search keywords'. 

Basically I want my function to get the same invocation that node_search is getting so that I can access the keywords and modify the results array returned by hook_search.  Any ideas?
If you look at search_menu(), you will notice the following code.

  foreach (module_implements('search') as $name) {
    $items['search/' . $name . '/%menu_tail'] = array(
      'title callback' =&gt; 'module_invoke',
      'title arguments' =&gt; array($name, 'search', 'name', TRUE),
      'page callback' =&gt; 'search_view',
      'page arguments' =&gt; array($name),
      'access callback' =&gt; '_search_menu',
      'access arguments' =&gt; array($name),
      'type' =&gt; MENU_LOCAL_TASK,
      'parent' =&gt; 'search',
      'file' =&gt; 'search.pages.inc',
    );
  }


Every module implementing hook_search() gets a menu tab. So, your module will be asked to search only when the users select its tab.