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"