Thursday, October 31, 2013

Partial Page Exclusion in SharePoint Search


Out of the box search results in SharePoint shows unnecessary data such as navigation, left nav, footer, right nav etc., that may not be useful to end user. Fortunately, it’s easy to exclude those items from appearing in search results by using a technique called “Partial Page Exclusion”.

How to use:

Just include a class called “noindex” for the items that needs to be excluded from search results. This tells the crawler to ignore those items. Here is a sample example in which crawler is forced to crawl only content present in body class. All other items are ignored.

<!DOCTYPE html>
<html lang="en" xmlns="">
<meta charset="utf-8" />
<div class="wrapper">
<div class="header noindex">
// Header Data
<div class="topnav noindex">
// Navigation
<div class="body">
// Header Data
<div class="footer noindex">
// Footer Data


No comments:

Post a Comment