Protiviti / SharePoint Blog

SharePoint Blog

July 30
Why YOU Should Be Using a Content Search Web Part

​New in SharePoint 2013, Content Search Web Parts have taken the SharePoint world by storm. Unfortunately this storm is usually associated with hail, damaging winds, and heavy rainfall (IE - a lot of stress and hair-pulling to figure out how to configure this web part). The good news is that it is not as hard to configure as most users seem to think. Content Search Web Parts are a great addition to SharePoint 2013 because of their flexibility to display content from multiple site collections. Although the Content Query Web Part is still around and can be utilized, the Content Search Web Part should take priority, and below are a list of reasons why.

 

1. Content Search Web Parts can pull content across site collections and display the information with the same formatting

2. Content Search Web Parts do not have a maximum number of filters to display content.

3. Content Search Web Parts have the ability to page so a user can display information in groups.

4. Content Search Display Templates (used to manipulate the way the information is displayed - like item styles for Content Query Web Parts) use HTML, not XSL which is a lot easier to write and format.

5. Data that is retrieved from a Content Search Web Part comes from the Search Index which is much faster than data retrieved from the Publishing Cache (Content Query Web Part).

 

Of course, where there are many positives, there are always a few negatives. In this case, the positives greatly outweigh the negatives. The biggest deterrent from using a Content Search Web Part is that it pulls content based on the Search Index. This means that only items that have been crawled will appear. Most sites are set up to crawl frequently, (some sites crawl every 5-10 minutes and search crawl settings can be changed if a site is not crawling frequently enough to display new content) but some users prefer that their information appear instantaneously instead of having to wait until the site crawls again.

 

Configuring a Content Search Web Part is not as daunting as it sounds. It is actually simple as long as you know what content you need to pull and where you need to pull it from. Building a query can be as simple as clicking the metadata you want to filter by. Presented below is a situation where a simple query needs to be built to display articles tagged with certain metadata and are using a specific content type.

 

For example, if there is a list of articles from a certain time period that you want to display in a Content Search Web Part, you would go in to the web part properties and click "Change Query". This brings up the Build Your Query dialog box.

 




 

The query shown above is done in "Quick Mode" and searchs for all pages and is not restricted to a specific site collection. It will search all web applications that are attached to the site. The results are being restricted by the tag "August 2014." So the search will find pages that are tagged with August 2014 and display them.

 

If you want to filter these results and only show pages that are tagged with August 2014 as well as Computers, this can be done in the "Refiners" tab. The "Refiners" tab allows a user to select as many filters as they need to in order to pull through the correct content. Below is a link to Microsoft's website that goes into greater detail on how to configure a Content Search Web Part.

 

 

http://technet.microsoft.com/en-us/library/jj679900%28v=office.15%29.aspx

Quick Launch


© Protiviti 2020. All rights reserved.   |   Privacy Policy