How to avoid some nodes from being searched

tekila - October 17, 2009 - 19:34

I am not sure if topic has been posted. I made a little search in the forum topics but I did not find any that muchs to my need. Here is situation:
I have developed a Drupal based Local intranet system for our institute members and will be launched to the members in the coming days.But when I made some testing on the system developed I found out the search engine included in its search result two node contents which I don't want them to be displayed.
The contents are meant to be displayed in two cases ( Permission denied and Page not found type) that I have made a custom pages that are friendly to the user.

But being displayed in making a search is embarrassing to find "You are not authorized to see this page ...Permission required .."
The problem is that the contents of the two nodes node/n node/m is already indexed in the database. So what do I have to do to avoid these from being search results?

Is that MySQL tweaking or some Drupal refining? Need fine words over here. Thanks in advance.

Hi, I've done this in the

mshepherd - October 17, 2009 - 19:38

Hi,
I've done this in the past with a custom module, but I just found this that may help:
http://drupal.org/project/search_restrict

My custom module route was

mshepherd - October 17, 2009 - 19:41

Thanks for the Information

tekila - October 18, 2009 - 19:04

Thanks the above link has great article with great comments. I come across many helpful information regarding search results and search option and found out the
search_config would help a lot in filtering the Advanced search options.
But my case seams different. I created two pages. One for Page not found and the other for access denied friendly messages. The two pages are listed in some search results as they are indexed in the DATA Base. How to restrict these two pages from being displayed. But I have also many pages of the same content type I want them to be searched.

Lead and Accelerate Your Life

Subscribe

Yuki - October 20, 2009 - 14:09

Subscribe

A couple of things you could

mshepherd - October 20, 2009 - 21:18

A couple of things you could try:

  1. Try unpublishing your access denied friendly message nodes. You'll need to check that they no longer appear in search results (re-index the site before checking) but nonetheless appear when required (on page not found etc)
  2. Create a new content type for your message nodes. It could be called system messages or something. You could then use one of the routes I mentioned above to stop that content type from being indexed.
 
 

Drupal is a registered trademark of Dries Buytaert.