Hide navigation nodes from showing in search result

When searching a term in SharePoint 2010, the result returns pages that doesn’t contain the term but it’s nested sub pages has the term. For example, the “Science” page which doesn’t contain the word “carbon” but it has a sub site called “Carbon” which contains the word “carbon”. When searching “carbon”, both the “Science” page and “Carbon” page gets displayed in the result set. To hide the top level pages which doesn’t contain the searched term from the result set, the following code needs to be added to both the global navigation and quick launch divs.

class = "noindex"

Reference:
http://www.matdesmarais.com/2011/12/sharepoint-2010-excluding-navigation-nodes-from-search-crawl/

http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/01/26/how-to-exclude-part-of-a-page-from-being-indexed-by-sharepoint-search.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s