Skip Ribbon Commands
Skip to main content

Quick Launch

Laura Rogers @WonderLaura > Posts > SharePoint 2013 Web Part: Content Search
July 17
SharePoint 2013 Web Part: Content Search

CropperCapture[77]**NEW VIDEO to go with this post

The new content search web part in the SharePoint 2013 preview (enterprise) is just awesome, awesome, awesome. 

Remember quite a while back when I wrote a post about how to utilize the search results web part to show the logged in user a list of sites that they have access to?  Well now in this new SharePoint, this web part is used all over the place, and you can also insert it anywhere you want.  For example, when you are on your My Site and you see a list of all of the tasks assigned to you, THAT is this web part rolling up that content from all over the farm.  Also, on the Community Portal (site collection template), you see a list of all community sites rolled up in one list.  THAT is also this web part.  There are many other examples, but let me go ahead and show you the coolness:



When I click the Change Query button, it brings up this interface with TONS of options, and as you change options your live results show in the search results preview on the right:




You can select from Documents, content types, tags, videos and more, and then pick the scope, such as a certain site or site collection, or unrestricted (whole farm).



There a many refiners (filters) you can choose from.  In this case, SharePoint recognizes that I created a column called “Department” in a document library, so it shows as a refiner.  There are dates, file types, creator, editor, content types, size, and more.



On the settings tab, you can even change the performance of your web part on the page!  Wow, this is much better than that old content query web part which could be a real hog.



The test tab shows you the actual query text that is used behind the scenes to create that query.


After I click OK at the bottom of this query page, there are still more settings available in the web part properties.

Number of Items to show

You can set up the default number of items to show in the web part.  The default is 3.

Display TemplatesCropperCapture[84]

The control drop-down box lets you choose from list, list with paging, and slideshow.

The Item drop-down box has selections such as “picture on left”, 2 lines, large picture. 


Property Mappings

CropperCapture[85]Depending on what you select in the Item drop-down box, you have different choices in the Property mappings. 

Since I chose two lines, I get to customize what those 2 lines are if I want to.  Right now, line 2 is empty, but I can pick another property to display on that second line, like the last modified by person, or a description or something.



CropperCapture[87]The Result Table drop-down lets you pick from Relevant Results, Personal Favorite Results, Refinement Results, and Special Term results.



In summary:

Remember that for search results to be accurate, you have to actually have your search crawls / indexing set up and on a schedule.  If your search only indexes the content once a day, then the results in this web part could be a day old.  If you set up your index say, every 20 minutes, you’re going to have much more accurate and current results displayed.




Thorsten Hans

Hi Laura,

nice post on one of the great new SP 2013 features. The Content Search WebPart is just awesome.
 on 7/18/2012 8:19 AM


Hi Laura,
This web part looks cool. I am wondering since the content of this search web part is only fresh as the last crawl, wouldn't it be nice to also show the last refresh (recrawl) time stamp somewhere on the web part? This way everyone looking at the web part knows whether their content is 20 mins or 2 hours old etc. Not sure if this capability is available OTB...
 on 7/18/2012 10:38 AM

Nik Charlebois

I got a question from a colleague of mine about the XSL editor option that seems to be gone from the web part toolbar. How would one go and modify the XSL template for the search results in SharePoint 2013? Any ideas? Thanks
 on 9/27/2012 8:55 AM

Beatrix Krammel

Hi Laura,
thanks for this post! Do you have an idea which settings I need to change to have Content search web part or the content query web part avaiable? I enjoyed your Video a lot, but without having these options, I can't make use of it. Any ideas?
 on 11/29/2012 4:25 AM


There's some new continuous crawl type of feature now in 2013, so you shouldn't have to worry about when the last crawl was.

Here's a post from the SharePoint team blog that may answer your question:

Content Query web part is gone, and content search web part doesn' seem to exist in office 365.
lauraNo presence information on 12/18/2012 9:28 PM

Tapan Bhatt

This is really a nice post, I'd like it very much, my question is can we apply formating on serch result e.g.: if I qant to add columns with some fancy buttons and manage that item using that button? Is this thing possible with it?
 on 3/1/2013 5:03 AM

Certainly Content Search web part is a nice improvement over content Query web part because of the limitation of Site Collection. The functionality of using different styling is also been upgraded with more style using XSL. Another most valuable feature is dynamic query builder along with the query variables like Today, Current User Name etc.
 on 4/24/2013 11:41 PM


Hi Laura-

I am trying to use the Content Search webpart to create a suggested people listing for my job site (SP2013).

Basically I have a custom list of Jobs and a contact list of Candidates. I want to match the skills required by the job with the skills that a candidate has. (I should mention that my Skill column is a Managed Metadata column)

The thing is, that both jobs and candidates will have multiple skills requirements and so far I can only match 1 candidate skill to 1 job skill. I have searched everywhere because I am having trouble with the Statement and I am not very familiar with the query language. Maybe I am completely out of my range at this point but I really wanted to give it a try before going into SPD.

If I were to tell the query story I would say "From all Candidates, show me the list item in Candidates where Skill (Column in Candidate List) contains Skill (In Job Skill Column)"- Example: If a job requires HTML, CSS and C# and my Candidate has HTML & C# knowledge listed in the Skills column (HTML; C#) I want him/her to show up in my results as a suggested candidate.

The job list and candidate list are separate. They share a site column called Skills. I have all this in a separate webpart page called candidate search, I have tried filters, CSWP, CQWP, etc... with not much luck.

Any ideas of how I can accomplish this with the Content Search web part would be absolutely appreciated! Your posts are always so helpful!
 on 4/29/2013 5:38 PM


Hi Catalina,
That sounds like a really cool idea, but I can't think of how it could be accomplished.  I did find this Keyword Query Language (KQL) syntax reference for you...
Laura RogersNo presence information on 6/13/2013 11:35 AM


Hi Laura
I've working on setting up some sites in SharePoint Online and wanting to use the Content Search webpart.  I can get it to provide results in the Search Result Preview pane of the webpart  but when I save the query and the webpart no results are acutally displayed on the page (despite that I can see the same documents as are displayed in the preview results).

Any ideas?  This is driving me nuts!

 on 1/22/2014 7:25 PM


Hi, I've seen that happen a couple of times, but it seems pretty random.  Usually I've been able to delete the web part and start over and the problem goes away, or I just tweak it like crazy and it eventually works, but there is no rhyme or reason.  :-S
Laura RogersNo presence information on 2/3/2014 2:46 PM


I am using Content Search Web Part to surface the popular item in site and in Display I am using List Control and Picture on left, 3 lines on right.
I get the correct result set BUT the issue is I am not getting thumbnail for items.

In regular search center I am able to get the thumbnail and hover over is working fine but struggling with this web part.

Any suggestions?
 on 2/12/2014 2:45 AM


Hi Laura,
I have a content search web part which displays recent forums created. I chose List as Control Display Template and Two lines for Item Display Template. (I just need a list, with the title and author information). I'm new to Sharepoint and still working my way to explore its features.

Bottom line is, I would like to get rid of the icon found at the left side per result. On your provided screencap, the Word document icon.

Hoping or your quick response. Thanks!

Twitter handle is @donna_mae
 on 2/21/2014 2:41 AM


You can try using the Search Results web part instead of the Content Search web part, and you may get the look and feel that you need.

Hi, unfortunately they don't give many options for adjusting the way these look.  The next step is to try (what I suggested to Anup) or you'd have to get a dev involved and create a custom display template.
Laura RogersNo presence information on 3/26/2014 10:01 AM


Thanks for the post.  I see Content Rollup, but I do not have the option for Content Search, just Content Query within it (a few others appear to be different/missing as well).  Is the Content Search option specific to a certain version of SP 2013?  We are running Standard Server.  I’m wondering if we don’t have something configured properly for this to show, if it is supposed to be available within our version. 
I am trying to use the web part to aggregate all new and recently changed documents, which seems easy enough, but what I currently have setup has a quirk and is showing text from the files in place of the name of random files.  The Content Search appears to be exactly what I need, I just don’t have the option. 
Thank you - Angela
 on 10/7/2014 10:46 AM


How do I change the "SEARCH RESULT PREVIEW" on my content search, I am new to this also, what if I want it to display things from a particular part of the share point site and not use what it is displaying.
 on 10/30/2014 4:29 PM


Hello Laura,

Could you please guide on- How to Display the Sites names in a site collection based on the Permissions levels that a user has on that Particular site collection Using Content Search Web Part.
I am facing issue in writing the exact query to get my results

Thanks in Advance for your reply.
 on 2/5/2015 6:10 AM


I am trying to find an online resource that gives explanations of the 100's of managed properties in the CSWP Property mappings configuration. Basically I am trying to do a blog sites' rollup (many blog  subsites rolled up onto one page, displaying blog title and latest post) and thought this webpart would do the trick but all I have succeeded in getting is the title.

Thanks, Alon (@alongoldberg)
 on 2/10/2015 7:56 AM


I can see the results I want in the Test but I see no results when the Web Part is live. I've tried not changing any settings but still see nothing. The search is working on the site and I can happily search and see the items displayed in a normal site search.
Any suggestions why I can't see any results on the live web part?
 on 5/14/2015 12:57 AM


Yes, as stated in the first sentence, it's enterprise only.

Yes that's "restrict results by app", which is in my Basics section above.

Switch to Advanced Mode, and then in the keyword filter box, choose Only return sites, and click the Add keyword filter button.  This will put contentclass:STS_Web in your search query box.  Users will inherently only see sites that they have permissions to.  If you want to see site collections, that's contentclass:STS_Site

Yes, I agree, it would be nice if that were documented.  I haven't come across any documentation on that, and usually just guess.

I've seen it do that based on a weird color scheme or branding, and then I've seen the stuff appear once I exit edit mode on the page.  Not sure how to fix it, though.
Laura RogersNo presence information on 8/21/2015 1:14 PM

Vijay Chavan

Done ! nice blog....Thanks
 on 9/22/2015 1:26 AM


Is there any way to change the speed of the rotation (change at a slower rate) on the CSWP? I don't see an option anywhere in the settings.
 on 9/28/2015 10:33 AM


Is there a way to display Content Search web part results in a list view with additional columns added to it? if Yes, how?

 on 10/14/2015 8:51 AM


Hi i hv problem using Web Part Popular Items. Public user cannot view the popular item. May i know why?
 on 11/12/2015 1:18 AM

 Contacting You Back

​When you ask a question here, and would like to know when I answer you, please provide your twitter handle, so I can ping you when I respond.  It takes me a few weeks sometimes.  Also, if you put a link in the Comment URL box, your comment will automatically get deleted.  This is because of all of the spam comments I get.

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Your Name *

Body *


Today's Date *

Select a date from the calendar.


Laura Rogers @WonderLaura
RSS FeedFacebookYouTube

 Our Books for End Users