I have been working on SharePoint Online Intranet for mid-sized organization during last few months. After initial information architecture and logical model of Intranet, we had situation where both Content Query web part or Content Search web part were ideal choice for data roll ups on both Corporate Intranet and department site landing pages.
As with any Microsoft technologies especially in SharePoint space, there are pros and cons of each option and one option might be better in one situation compare to others. Below is high level comparison table I had built while making decision on Content Query Web Part vs Content Search web part. One advice here is don’t go blindly with Content Search web part because it’s latest and greatest. It has it’s own share of disadvantages. At the same time, there is a reason why SharePoint professionals hated Content Query web part and Microsoft recommended Content Search web part in SharePoint 2013. Most important decision here is freshness of data vs. system performance vs. latest and greatest technologies.
Please note that if you have SharePoint 2013 On-premises Enterprise CAL or Office 365 E3 Plan and above, I would prefer Content Search web part over Content Query web part in most cases except if you are rendering instantaneous data.
Here is the comparison table promised above. Hopefully this table will help you identify correct choice to meet your needs whether it’s SharePoint Online or SharePoint On-premises. Don’t forget to review SharePoint Online Service Description before committing Content Search web part to see whether it’s supported in your plan or not. Pick your poison and deal with it!! 🙂
|Content Query Web Part||Content Search Web Part||Comments|
|SharePoint Version Support||Introduced as SharePoint 2007 Publishing feature||Introduced as SharePoint 2013 Cross-Site WCM Publishing Feature||N/A|
|On-Premises vs Cloud||Supported on both on-premises and cloud, Available only on SharePoint Server Enterprise CAL, Supported on both on SharePoint Online Plan 1 and Plan 2||Supported on both on-premises and cloud, Available only on SharePoint Server Enterprise CAL, Supported only on SharePoint Online Plan 2, Office 365 Enterprise E3 and E4 Plans (please see link below for latest support),||CSWP is not available in SharePoint Online Plan 1 or Office 365 E1 and E2 plans.|
|Feature Dependency||Publishing Feature – Both site and site collection features||Publishing Feature for Cross-Site Publishing – Both site and site collection features||Both CQWP and CSWP requires publishing feature activated. If you are planning to save site as template, you won’t able to use this web parts in your browser based site template.|
|Data Retrieval Architecture||Data retrieved from Publishing Cache either from local web or drill down to sub sites, much slower than CSWP||Data retrieved from Search Index, much faster than CQWP||Use CSWP to retrieve data much faster than CQWP|
|Results Scope||Scoped at site collection, Can be used only in one site collection, can’t be used for cross-site collection||Scoped at the farm or cross-farm depending on Search service configuration, Can be used as cross-site publishing and cross-site collection||Use CSWP to retrieve data from cross-site collection|
|Results Rendering Technology||Allows you to customize rendered results with XSLT||Allows you to customize rendered results using Display Templates – HTML layout||Use CSWP to render results with latest technologies|
|Results Freshness & Accuracy||New items will show up instantaneously but puts lots of load on web front-end servers and SQL server to read data from cache or build cache||Because of search crawl dependency, new items won’t be displayed until they are crawled but much faster performance and requires less resources. For On-premises, data freshness can be controlled by crawl schedule. For cloud, you may not have full control over crawl schedule.||Use CQWP for fresh and instantaneous data or make end-users aware of potential delay of publishing data with CSWP|
|Results Availability – Minor vs Major versions||All the minor and major content is available as soon as it’s created as long as user have access to the content||Search crawls only the major versions of content, not minor versions. Minor version of content not included in results.||Use CQWP to display both Minor and Major revisions of content, Note that for authors whose documents are in draft mode will be available through this web part in author’s view but may not available for others to see until documents are published as major version unless they have access to minor version|
|Results Availability – Content Marked as Indexed
||Use this web part if you want to return results from a site that is marked to not index||If the site, list, or library is marked to not be indexed, the content won’t be available through this web part||Use CSWP if you want to control results based on whether it’s marked as indexed or not|
|Audience Targeting||Supported||Not Supported||Use CQWP if you want to support Audience Targeting|
|Security Trimming||Supported||Supported since Search is security trimmed by default||N/A|
- SharePoint Online Service Description – http://technet.microsoft.com/en-us/library/jj819267.aspx
- MSDN Forum – Content Search web part vs Content Query web part http://social.technet.microsoft.com/forums/sharepoint/en-US/c69e0e45-8517-49ab-a004-bb2e251bcbad/content-search-webpart-vs-content-query-webpart
- Learning SharePoint – Content Search Web Part (CSWP) VS Content Query Web Part (CQWP) – http://www.learningsharepoint.com/2012/07/22/sharepoint-2013-content-search-web-part-cswp-vs-content-query-web-part-cqwp/
- Content Search Web Part in SharePoint 2013 – http://msdn.microsoft.com/en-us/library/jj163789.aspx