hi

i've drupal 4.7.2 and i'm using the newest version of the "node (key)words" module. i'd like to have the right nodes showing up in search results when somebody enters a specific word that's defined as the node's meta tag. the builtin search module does not seem to index the meta tags.

is there a way to get this to work? the search module is rather useless like this. i don't want to rewrite all pages just to get the keywords into the text. every help is much appreciated.

thanks,
roberto

Comments

Bèr Kessels’s picture

You should build (or get someone to do it for you) a hook_search into the node_keywords module. http://api.drupal.org/api/4.7/function/hook_search

---
Professional | Personal
| Sympal: Development and Hosting

cooperaj’s picture

You could implement the 'update index' part of the hook_nodeapi and spit your keywords into the body content. That would work and would involve a lot less effort.

function hook_nodeapi($node, $op, $teaser = NULL, $page = NULL) {
  switch($op) {
    case 'update index':
	  $done = array();

          // Load you node keywords
          getkeywords(); //Don't know how keywords module works.
         
          // By using 'h2' as a html wrapper the search module will make you keywords
          // more relevant.
          $done[] = '<h2>'. /*Spit out your node keywords*/ .'</h2>'; 


          // Return an array of strings. In this case just the one will do
          return $done;