Content Query Web Part and Content Search Web Part are very powerful web parts helpful in content aggregation. By using these two web parts you can get content from across different sites, lists, as well as content from across site collections, web applications and other SharePoint farms.
Also you may like to read:
– SharePoint 2013 Online Content Search WebPart with Query String
– SharePoint online 2013 content query web part query string filter
Content Query web part a very powerful web part in SharePoint 2010, by using this web part we can get content from lists across site collection. But it can not be beyond the site collection. You can able to retrieve from a single site collection.
SharePoint 2013 provides another web part known as Content Search Web Part which will be helpful in retrieving content beyond site collection. So it is necessary to consider some points before deciding which web part should you use.
Follow Below Point:
– If you want the content to available instantly after it is authored then Content Query Web Part is the only available option, because Content Search web part will not be able to display items before crawling and indexing by the search service. Content Query Web Part can access the content instantly.
– Content Search Web Part is the best suitable when you want to retrieve content across site collection, web application or farm boundaries. CQWP can access content only from site collection not beyond site collection.
– You can also use CQWP in small two server farm topology which need to support several users requests. This topology will not be able to support constant demand of a search application’s crawl and index component.
– In CQWP you can be able to put maximum of 3 filters, but in CSWP you can have multiple filters.
– To change style we need to change through XSLT, but in CSWP styling makes easier by using HTML and JS.
– CQWP is optimized for caching and also resource friendly. In CSWP you need to crawl regularly to keep the content fresh and available.
– Apart from this, SharePoint search only crawl major versions of content, never it does minor versions, so if you want to display minor versions content, then we can use CQWP.
– If your admin team marked a site not to be indexed then only we can use CQWP, because those site content will not appear in the search result, so CSWP will not be able to find the results.