Community & Support

Exclude certain pages from search - best way?

There are a few pages on my site that shouldn't show up on search results. I'm not trying to restrict by node type or by user role or anything like that - I just want a small set of pages not to show up in searches.

I ran across the Restricted Search module (aka SearchBlock) http://drupal.org/project/search_block and I guess there is a development version for D6, but no officially released version. It looks like it would do what I want.

I'm a little leery of non-released modules - is there any simple alternative?

I'm tempted to just use PHPMyAdmin to just remove all entries from the search_index table that have an sid that matches the nodes that I don't want indexed. Would this corrupt the search/index system? Would those nodes just get reindexed at the next cron run? And for that matter, if I want those nodes to be indexed in the future, how would I do that?

Thanks! -Steve

Comments

I'm still hunting for a way

I'm still hunting for a way to do this. In researching, I see lots of discussion (and some possible solutions) if one wants to exclude a certain type of node from searches - but no way to exclude particular nodes.

I don't know how to create a module, but I think I could maybe put together a shell script that would have a list of node IDs that I don't want indexed - and then the script could execute a MYSQL command once a day or something to delete any entries in search_index for those nodes.

I'd love to get some feedback about whether something like this is likely to kill my Drupal search/index system as a whole?

Any luck finding out how to

Any luck finding out how to do this?

Use robots.txt file

Create a robots.txt file and disallow this set of pages with the proper code on the file, also add the no follow attribute to the internal links pointing to this pages, this surely will stop them from been crawled by the search engines. The code for a robots.txt file is really simple an you can find online.

Robots.txt is for web search

Robots.txt is for web search engines. This query was about Drupal's internal search module. I never did find a way to do this.

We have the same issue. We

We have the same issue.

We want to use a node in several panels. The node as a standalone content doesn't have much sense so we would like to exclude it from the search list. On the other hand, now the different panels where the node is used don't appear in the search list.

If anyone can help we would appreciate it.

nobody click here