1 search.module | search_node_update_index(Node $node) |
Implements hook_node_update_index().
File
- core/
modules/ search/ search.module, line 853 - Enables site-wide keyword searching.
Code
function search_node_update_index(Node $node) {
// Transplant links to a node into the target node.
$result = db_query("SELECT caption FROM {search_node_links} WHERE nid = :nid", array(':nid' => $node->nid), array('target' => 'replica'));
$output = array();
foreach ($result as $link) {
$output[] = $link->caption;
}
if (count($output)) {
return '<a>(' . implode(', ', $output) . ')</a>';
}
}