How to not index comments in search_index? I'm using drupal search, the core module.

I want to not index the comments in the search_index

In the node.module, the "function _node_index_node($node)" loads and renders the node. Comment content is loaded and indexed here. I would like to not load the comments content here in order to not index this content. How can i do this ? Thanks

NB : i'm drupal 6, but tips in 6 or 7 are welcome
There doesn't seem to be an easy way to do this in drupal 6.

It gets added in hook_nodeapi() but the comment module, so comment_nodeapi().

There is no way to override what gets added in this manner.

So you would have to hack the comment module to make it no longer do that by removing the 'update index' part.

Hacks
A note on hacks:
In cases where you really do have to hack core, I recommend creating a patch file for the change and give it an informative name.
Then commit to your version control the change and the patch.
Keep a list of any hacks you might have, along with their purpose, which files have been changed, and their relevant patch file, in your developer documentation.

Then when you go to upgrade drupal next time you have the patch file, so you can update, then apply the patch (if the patch doesn't apply cleanly you can re-roll it).
Easy.

This way if you ever hand over the project the next person will have it easier too.