make the keywords searchable by the drupal search engine
Benefit: I can provide some words which are synonyms of the contents' topic

Comments

Robrecht Jacques’s picture

Assigned: Unassigned » Robrecht Jacques
Status: Active » Fixed

Feature added to CVS-HEAD (revision 1.12 of node.module).

Tobias Maier’s picture

global keywords should not be searchable
because then you'll find every site...
and this makes no sense

Tobias Maier’s picture

this was just my answer to /* TODO: what about global keywords? */

Tobias Maier’s picture

Category: feature » bug

I tested it a lot now but it does not work...
did everything.
created new content with keywords --> run cron.php
the word in the keywords could not be found...
and so on.

Please look at it again and thanks for your fast response on this issue in general

Greets

Tobi

Tobias Maier’s picture

Title: make keywords searchable » make keywords searchable --> does not work
Status: Fixed » Active
Robrecht Jacques’s picture

You are quite right, it didn't work :-(.
I'm working on a "metatags" module that should replace this one (handles keywords, description, and other meta tags) and had already added "search" to that module... just copying the lines I thought did the trick, didn't seem to work :(

Try the latest version in CVS-HEAD (revision 1.13), it should work now.

Note that you'll have to resave the nodes with keywords (or description) in it, as "node.module" will only update the search index when a node is saved. For new nodes it should work right away (well, from the moment cron has runned cron.php).

Could you try it, and report back if it doesn't work?

Thx.

One thing I'll still need to investigate is how to attach more weights to the meta-keywords. Now they are just counted as one of the words in the body (each word gets a weight of 1) - title words get a weight of 22... As the user is putting much effort in assigning keywords to the node, they probably should get a higher weight too. Still looking how to do that...

Robrecht Jacques’s picture

OK. I've found how to do this: instead of outputting "$node->nodewords['kewyords']", output something like "<h1>$node->nodewords['keywords']</h1>". This way keywords will get this weight of "22" too.

The weights seem to be:
- h1: 22 = used for title
- h2: 19
- h3: 16
- h4: 13
- h5: 10
- h6: 7
- strong: 6
- em: 6
- normal word: 1

Maybe use h2 for keywords and h3 for description? What do you think?

Tobias Maier’s picture

Maybe use h2 for keywords and h3 for description? What do you think?

I think that would be great.

I'll test it now...

Tobias Maier’s picture

Status: Active » Fixed

it works

Thanks a lot

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)