'node', 'name' => 'title', 'extra_name' => '', 'label' => t('Title'), 'help' => '', ); // TODO: Node author. return $fields; } /** * Implementation of hook_nodeapi(). * * This is used to add our own entries to the search index. Using nodeapi's * update index operation is convenient, since the node module already handles * the logic for determining which nodes need indexing. */ function node_field_indexer_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { static $fields = NULL; if ($op == 'update index') { if (!isset($fields)) { $fields = field_indexer_load_fields(TRUE, 'node'); } foreach ($fields as $field) { $value = ''; switch ($field['name']) { case 'title': if (isset($node->title)) { $value = check_plain($node->title); } break; } if (trim($value) != '') { field_indexer_index($node->nid, $field['fiid'], $value); } } } }