Protiviti / SharePoint Blog

SharePoint Blog

October 11
Tips & Tricks: When to use the Content Search Web Part (CSWP) vs Content Query Web Part (CQWP) in SharePoint 2013?

​The Content Search Web Part (CSWP) is a Web Part introduced in SharePoint 2013 that uses various styling options to display dynamic content on SharePoint pages. The webpart displays search results in a way that you can easily format. In earlier versions of SharePoint, somewhat similar results were achieved using the Content Query Web Part (CQWP).

So what are the differences between Content Query Web Part (CQWP) and new Content Search Web Part (CSWP)? How do you know which one to use and when?

Content Search Web Part

Definition: A webpart that displays search results based on a associated search query.

Display Results: The CSWP can return any content from the search index. It queries against the Index to display results.

Result Accuracy: The CSWP returns content that is as fresh as the latest crawl of your content, so if you crawl often, the content that the CSWP returns is more up-to-date than if you crawl infrequently.

Content in Results: Search crawls only the major versions of content, never the minor versions. So no minor version documents are included in results.

Results Availability: If the site collection or site is marked to not be indexed, the content is not available using CSWP.

Content Query Web Part

Definition: A webpart that displays content based on a query or otherwise form the entire site collection.

Display Results: CQWP return any content from within the site collection based on the filter.

Result Accuracy: CQWP displays instant content or the refreshed version of content.

Content in Results: CQWP on the other hand displays minor versions of your content as well.

Resource Allocation: If you want to return results from a site that is marked to not index, use the CQWP instead.

Read more:

Quick Launch

© Protiviti 2020. All rights reserved.   |   Privacy Policy