Skip to main content
Content Search Web

When To Use Content Query Web Part (CQWP) and Content Search Web Part (CSWP)

Share Point 2013 has several out-of-the-box web parts and the most widely of these are Content Query Web Part (CQWP) and the Content Search Web Part (CSWP). These two web parts are used for querying and search crawl indexed data from a share point site.

ContentByQuryWebpat referred as Content Query Web Part (CQWP) is used to display content using query/filter from another site or sub site within the same site collection. With the CQWP, content display as per the requirement, branding and context can be controlled. CQWP results are pulled using query or search directly from the site.

Content Search Web Part (CSWP) is available with SharePoint On-Premise and in Office 365 tenants. CSWP uses search indexing to return faster results using less resources. CQWP and CSWP web parts require publishing feature to be activated.

Let us explore the best situations/scenarios for using each web part.

Content Search Web Part (CSWP)

  • When we need to display all items of a type with n a site collection or from a different site collection.
  • When we need to deal with a complicated query for instance a certain content type in a certain date range.
  • When we need to customize the display of the items.

Content Query Web Part (CQWP)

We can use Content Query Web Part (CQWP) when we want to display a finite list of properties like title, description and image.

Please see the below image for more details on the same.

1

Content Query Web

 

Pros and Cons

Web Part BehaviorContent Query Web Part (CQWP)Content Search Web Part (CSWP)
Query configurationEasyYou will need to know about certain search features such as managed properties.
Query across large amounts of contentLimitedyes
Handle complex queriesLimitedyes
Scale to handle future content growthLimitedyes
Display content from other site collectionsNoyes
Design of query results can be customizedYes, by using XSLT.Yes, by using HTML.
Maintenance cost in a complex site architectureHighSmall
Narrow down the query results that are displayed in the Web PartNoYes, in combination with other search web parts.
Guruswamy Jetti

Guruswamy Jetti

Guruswamy Jetti works as Module Lead with Trigent Software. He comes with over 9+ years of software development experience in Microsoft technologies, web development using SharePoint (WSS 3.0 to SharePoint Online) and Cloud based solutions such as Microsoft Azure and Office 365. He also has strong experience in integrating Microsoft CRM with SharePoint and SSRS reports.