Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
One of the new Web Parts in SharePoint 2013 is called the content search Web Part and it's somewhat related to the content query Web Part but it's even better. So I'd like to show you how this works because it's a Web Part you may want to integrate in your site in many different places. I already have my page checked out and editable, so I'm just going to go to INSERT, Web Part and in the Content Rollup section here is Content Search, it has a nice verbose description because it's a newer Web Part, I am going to click Add.
And here it is, and it's just determining some settings, right now it's pulling back pages, how interesting. What we want to do of course is modify the Web Part and when we do that's when the magic begins. So I'm going to click the menu choose Edit Web Part. So we have Properties and before we even get to those we're going to click Change query.
There is a tutorial on how to build your query right here. What we have are BASICS, REFINERS, SETTINGS and TEST. As I said, this is like the query Web Part, but there is a lot more under the hood here. I can choose a query that already exists, a basic query. The default is what are the recently changed items and I can set the scope on this afterwards. So if I want recently changed items, that's great. What are the items that are new in the Current site, what are the items that are new in the Current site collection, 943 results would come back.
Or what are the recently changed items just in this site, or at a specific URL, for example I can point to a particular library or list and say, show me the new items from here. But what I prefer to do here is I actually would like to return documents out of the system, and I want to return documents from the current site.
I can restrict this to items based on its specific tag if I wish and I can enter a tag here for tag documents. So if you have your users using that feature, that's great, you can say, if you tag items they'll automatically show up here. But I'm going to leave these settings, these basic settings and let's take a look now at our REFINERS. The list of REFINERS is being automatically generated for me, so SharePoint notices for example that I have a list in this site that includes Departments, that I actually have a custom column in a library that uses Departments.
For example say, I would like to Add that it needs to be a document from Human Resources, now it's only 4. So now I've created Human Resources documents in this site. If I wish I can also say Human Resources documents in this site that were added by Gini Courter and I can remove items in exactly the same way. So here are all of my REFINERS, ManagedProperties, who is the Author and so on.
So I am going to just Remove this. But notice how many REFINERS we have access to, who is the displayed Author, what's the FileExtension, so documents by Gini Courter that were created using Microsoft Word in the new version. There we go. Now let's take a look at the SETTINGS. SETTINGS, we can actually determine how this performs.
So I can say, go ahead and use any Query Rules that have already been set up or Don't use Query Rules and I can determine whether or not this query is issued on a server while a page is loading or I can wait for it and I can also set its priority. The Query Web Part always likes to have high priority. So the nice thing is that I can say, this isn't that important or this is incredibly important. Finally on the TEST tab, I get to see the query text that was generated.
So if I want to tweak this a little bit, finally on the TEST tab I can see the query text that was generated. And if I wish, I can find information about the template, any Applied rules that come from this template. I can't modify this Query text here; however I can change it using the SETTINGS, REFINERS and my BASICS settings here. So I am all done, I can test the query if I wish, it brings back my results, I am going to say OK and that's my search criteria.
Now, notice that I had queries there that were returning hundreds of items, even in this case 32 items is more than I want to show initially, so I am simply going to show the first five. Now I need to determine how much space I'm willing to give to query results here. I don't want to return 984 items or even 32; I actually want to return 5 here. And I can choose how I'm going to see these items, whether I want a list, a list with paging that allows me to click so I have three items, in this case maybe I could show 9 for example, or a Slideshow.
Now when I use List with Paging or Slideshow, any of these, notice that I have a place for an image. I am going to choose List with Paging. And then I have choices about whether or not I want to have an image there. So here is Large picture, a Picture, Two lines of text, and the recommended items by default, Picture on the left, three lines on the right.
But I am going to go ahead and put Two lines here. Notice that I could be looking for video since simply saying we're going to display a video here in this Web Part. So because I chose Two lines of text, I actually get to determine what those two lines are. And for example I, could choose the date it was modified or who it was modified by or display some keywords, but I'm going to choose to show the author's name here. This Web Part also has Appearance, Layout and Advanced Properties just like the other Web Parts we've been using.
I am going to go ahead and click OK to apply my changes and there are my two lines and here is my with paging. So if you haven't used this Web Part yet, I would encourage you to jump in and take a look at the power that it gives you to create customized search Web Parts anywhere in your site. One more thing, you actually use this content search Web Part all the time, because Microsoft is using it over and over again in this site in places like insights where you take a look at my sites. That's actually a content search Web Part that's bringing back information based on your tagging.
So it's great here, it works for Microsoft and you can make it work for you and your users to.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 91099 Viewers
80 Video lessons · 138153 Viewers
59 Video lessons · 56967 Viewers
52 Video lessons · 70601 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.