make the keywords searchable by the drupal search engine
Benefit: I can provide some words which are synonyms of the contents' topic
make the keywords searchable by the drupal search engine
Benefit: I can provide some words which are synonyms of the contents' topic
Comments
Comment #1
Robrecht Jacques commentedFeature added to CVS-HEAD (revision 1.12 of node.module).
Comment #2
Tobias Maier commentedglobal keywords should not be searchable
because then you'll find every site...
and this makes no sense
Comment #3
Tobias Maier commentedthis was just my answer to
/* TODO: what about global keywords? */Comment #4
Tobias Maier commentedI 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
Comment #5
Tobias Maier commentedComment #6
Robrecht Jacques commentedYou 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...
Comment #7
Robrecht Jacques commentedOK. 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?
Comment #8
Tobias Maier commentedI think that would be great.
I'll test it now...
Comment #9
Tobias Maier commentedit works
Thanks a lot
Comment #10
(not verified) commentedComment #11
(not verified) commentedComment #12
(not verified) commentedComment #13
(not verified) commentedComment #14
(not verified) commentedComment #15
(not verified) commented