Awhile back, I wanted to add author names to the Drupal search index. After poking around a bit, I found that this was actually pretty easy. I created a new module called custom_helper and in it put the following function:
//Adding author name to the search index
function custom_helper_nodeapi($node, $op, $arg = 0) {
switch ($op) {
case 'update index':
if ($node->uid) {
$user = user_load(array('uid' => $node->uid));
return $user->name;
}
}