SharePoint Content Query Web Part vs Content Search Web Part in SharePoint On-Premises vs SharePoint Online Environments

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
Skill sets required to develop and maintain HTML, JavaScript, XSLT HTML, JavaScript, Display Template Framework, Catalogs and Cross-Site Publishing Use CSWP for latest and greatest technologies, after all its replacement for CQWP

References:

Advertisements
This entry was posted in SP2013 General, SP2013 Online. Bookmark the permalink.

6 Responses to SharePoint Content Query Web Part vs Content Search Web Part in SharePoint On-Premises vs SharePoint Online Environments

  1. Hi Nik Patel,
    Great info. Will Search Results webpart get the data from entire farm like CSWP?

    • Nik Patel says:

      Yes, all search web parts are available to return data from entire farm. On the side note, I have noticed that CSWP is available on SharePoint online plan 1 tenants I had worked recently. Please plan to check out CSWP before trying SRWP… Hope this helps.

  2. Manoj Gudi says:

    Hey Nik Patel,

    The differences you drawn are excellent and very useful information which can be gathered only if we dive deep into both (CQWP and CSWP).

    I appreciate your efforts. Thanks a lot:)

    Regards
    Manoj Gudi

  3. We integrated SharePoint2013 with TFS2013. I added a Query builder Web Part to SharePoint page to display active work items in read only mode for business users. But I am not able to figure out how to restrict the permission so that the users cannot edit the work items. I gave view only role for business users in TFS Security. If those users connect to TFS 2013 web access, they cannot edit anything but if they click on the work item from SharePoint and open it save is not disabled and work item can be edited.
    How can I disable the ability to edit when the work item is opened from SharePoint?
    Please provide some guidance on this.

  4. snhthakare says:

    Very clearly explained ! i went through lot of articles but this was the best.

Leave a Reply

Please log in using one of these methods to post your comment:

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