In this SharePoint Online search tutorial, we will discuss the SharePoint content search web part. We can use the same content search web part in SharePoint Online/2013/2016. Also, we will see advantages of content search web part over content query web part in SharePoint. How to add and configure content search web part in a SharePoint Online web part page. I will also show few properties available in the content search web part in SharePoint Online.
Apart from this, we will also see how to use SharePoint online search web part and configure sharepoint online search web part.
Content search web part in SharePoint Online/2013/2016/2019
Microsoft introduced the
By using the content search web part, you can display search results that can be easily formatted by using a custom display template. Behind each content search web part, there is a search query associated which provides the search results.
Display templates consist of HTML & JavaScript that decide the look and feel of the search result associated with the web part.
Advantages of SharePoint content search web part over content query web part
I have written an article on SharePoint 2013 content search web part vs content query web part. Read the article to know more about where to use the content search web part and where to use the content query web part in SharePoint Online or SharePoint 2016/2013.
Add and Configure SharePoint content search web part
Let us see, how to add SharePoint content search web part to a SharePoint web part page and we will also, see how to configure content search web part in SharePoint Online.
To add a Content Search Web part, First of all, open your web part page. Then click on “Add a Web Part” on the specific zone from where you want to add the web part.
Click on “Content Rollup” from the “Category” template and then click on “Content Search” web part as shown in below.

This is how to add a content search web part to a SharePoint Online site.
Now, we will see how to configure SharePoint Online content search web part with a few examples.
Example-1: Displaying Picture library items using Content Search web part
Once the “Content Search” web part will add to your existing web part page, follow the below processes for displaying the picture with the image sliding:
Click on the drop-down symbol which is present at the right side of the Content Search web part. Click on “Edit Web Part” from that dropdown to edit the web part properties.

In the “Properties” page, Click on “Change query” as shown in below.

In the “Build Your Query” page, Select the “Basics“. From the “Select a query” field, Select “Picture(System)” from the drop-down.

Again go to the “Refiners” tab, select the Picture from the “Content type“. On the right-hand side, we will see all the pictures of the SharePoint site. Then click on “OK“.

Now select the number of items which you want to show on the web part page. In the “Display Templates“, select the “Control” as “Slideshow” and next in the Item, Select the picture size as per your requirement.
Here, I have selected the “Item” as “large Pictures“.
Once all the Display Templates field value will over, Click on “Apply” and then “OK” as shown in below.

While you will click on “Stop Editing” mode from the ribbon, then the output screen will look like below. As per my requirement, the SharePoint online picture library items are coming in the image slider mode as like below screenshot.

Read SharePoint download multiple files
Example-2: Display SharePoint Online List Items using a Content Search web part
In this SharePoint search tutorial, we will discuss how to display all SharePoint Online list items using a content search web part. By using the content search web part, you can display search results that can be easily formatted by using a custom display template.
In my SharePoint Online site, there is a list as “Demo Product Details” which has below columns.
- Title
- ProductDetails
- ProductName
- ProductManinImage
I want to display the “Title”, “ProductPicture”, “ProductName” and “Product Details” in the SharePoint web part page using a Content search web part.

Here I am using a Publishing site. I have created a web part page and named as “DisplayListItem”.

Edit the page then add the “Content Search” web part which comes under “Content Rollup” of Categories section.

When the “Content Search” web part will successfully add to the SharePoint web part page, we will see the items which I have recently modified in the SharePoint site.

Display List Items using SharePoint Online Content Search web part
Now we will see how to display list items from a particular list using the “Content Search Web part” in SharePoint Online web part page.
Click on edit web part of the content search web part. Click on the “Change query” below the “Search criteria” like below.

The “Build Your Query” page, first check it is in “Advanced mode” or “quick mode”. If it is in “Advanced mode” then “Switch to the Quick Mode” from the right side corner of “BASICS” page. The “Quick Mode” page contains
Select a query : From the dropdown select “Documents(System)”
Restrict by the app: In the “Restrict by app” dropdown field select the “Specify a URL”. One input text box will arise, give the particular list URL in the text box which items you want to retrive.
Restrict by tag : Select “Donot restrict by any tag”.
Go to the “Advanced Mode”.

In the “Advanced mode” page remove the red column highlighted things, except the list URL delete all the thing in the “Query Text”. Click on “Test Query”

We can see all the list item in the “Relevent Results” in the “Search result preview” click on Ok. Then in the “Properties” page click on “Apply” and “OK”

We can able to see all the list item with the title filed in the web part page.

Use SharePoint Online List GUID to display items from a particular list
Now we will see by passing the guid how we will get the Particular list items.
For that first go to the particular list, list settings in the top we can able to see “List=%7B4D42C965-B4C6-46DE-99D4-82B97DAD7E1C%7D” with the list url. From this url we will get our list “GUID”.
convert the %7B to { and %7D to }. So our
“GUID” will be {4D42C965-B4C6-46DE-99D4-82B97DAD7E1C} .
Go to the web part page. Edit the web part. Add the “Content Search web part”. Go for the “Edit” the “Content search web part”. Click on “Change Query” and go to the “Build Your Query” Basics page.
In the “Quick mode page” in the “Select a Query” field select the “Item related to current user”. In the “Restrict by app” field select “Current site”. Now click on “Switch to Advanced Mode”.

The “Advanced Mode” contains some of the below field.
Select a query: By default the “Local SharePoint Result(System)” will be selected. If not select the “Local SharePoint Result(System)”.
- Keyword filter: In the Keyword filter the “Query from the search box” will be selected.
- Property filter: First click the “Show all managed properties”. Select the “ListID” from the dropdown. In the second dropdown select the “Contains”. In the third dropdown list select the “Manualvalue”. After seleccting the manual value one text box will come give the list “GUID”. Click on “Add property filter”.
- Query Text: In the Query Text we will see the List ID will be added automatically. To check the Query click on “Test query”. In the “SEARCH RESULT PREVIEW” we can able to see all the SharePoint online list item. Click on OK then all item will appear in the Web part page.

Display multiple columns in Content Search Web Part
Now we will see how to display more columns on the web part page using the content search web part.
In the below example I am showing you how to display “Title”, “ProductName”, “ProductImage” and “ProductDetails”
Go to “Edit the Web part” page. We can able to see “Property Mappings” option. Below the “Property Mappings”, enable the Check box “Change the mapping of managed properties for the fields in the item display template”.
After we select the text box we can able to see some of the text box field.
- PictureURL: I have mapped my SharePoint list “ProductImage” site column to PictureURL(managed property). So in the text box I have seleccted from the dropdown “PictureURL”. Already we can able to see the “PictureURL”, if it is not there then add.
- Link URL: Leave the field as it is. By default the field is selected to Path.
- Line1: I have selected the title column in the line 1 field.
- Line2: In the Line 2 I have selected the “RefineableString00(managed property)”. The Product name site column, I have mapped with “RefineableString00”. So i have selected the “Refineable string00” to displying the “ProductName” in the SharePoint web part page.
- Line3: Like that for the “Product Description I have selected the “RefineableString01(mapped to “Property Mappings”.
Click on “Apply” and “OK”.

Below screenshot we can notice in the output the Picture”, “title”, “ProductName” and “Product Details” is displaying.

Content Search Web Part with Query String in SharePoint Online
Now we will see how to create a query string in the “Content search web part”. Using the Query string we will display the items based on the various search criteria. Here we will see how we will filter the title field from the SharePoint online list using the content search query string filter.
For that, I have created one more content search web part and go to the “Change Query” of SharePoint “Edit Content search web part”.
In the “Quick Mode” in the “Select a query field” select the “Item related to current user(System).
Restrict By App: Give the SharePoint Online list URL below the “Select a query. Go to the “Advanced Mode”.

The advanced mode is containing “Select query”, “Keyword filter”, Property filter”and “Query String”.
Leave the “Select Query field, by default it is always “Local SharePoint results(System).
- Keyword filter: Select the “Value of a parameter from URL”.
- PropertyFilter: Select the “Title” field. If the field is not available then click on “Show all managed property”, then the title filed will available in the dropdown list. Leave the “Contains” field as it is. In the next drop down select the “Value of Parameter from URL”.
Click on “Add property filter”. In the “Query Text” box automatically query will be added that “Title:{QueryString.MyParameter1}”.We can change the “Myparameter1” name to anything, any name we can give.

sharepoint 2013
I have changed the “Myparameter1″ name to title.

content search web part query string
To display the more field in the content search web part, go to the prooperty mapping filed and add the fields in the text box.

Copy and paste the below url in the browser.
“https://onlysharepoint.com/sites/oursites/Pages/page name.aspx?title=DoorKnob”
We can able to see all details(ProductName and ProductDetails) about the item whose title value is “DoorKnob”.

We can add more query string parameter also. In the property filter I have selected the “RefineableString00” which is the managed property which is mapped with the “ProductName”. Click on the “Add Property flter” automatically the query string will be added in the “Query Text”. Change the “Myparameter2” name to “PN”.
Here I am using the and condition when both the condition will satisfy then the only item will show. The condition is (Title:{QueryString.title})(RefinableString00.{QueryString.PN}) which I have put in the “Query text”.

See I have written two condition with and so the output is coming. If I will only add the title value then the out put will not show.

So for that, we can use the or condition. If one condition is true then also item will display. I have added (Title:{QueryString.title}) OR (RefinableString00:{QueryString.PN}) in the “Query text”.

I have added only title field value then also item is displaying.

We were discussed how to display the SharePoint online list items on the web part page using the content search web part. How to display more than one column in the “Content Search” Web part using the content search web part property mapping option.
We were also see how to filter the item from the list using the query string in the web part page using the SharePoint online content search web part.
SharePoint search results web part
Want to know how to display sharepoint search results using an out of box web part in SharePoint Online or SharePoint 2013/2016 or SharePoint? Keep reading to know more on, Search results web part in SharePoint online. We will see, how to display documents created or modified by the current logged-in user using the sharepoint search results web part.
We will see how we can add a SharePoint search result web part to a web part page and configure search result web part to display logged-in user’s documents in SharePoint Online.
Search results web part in SharePoint online
Now we will see how to add a search result web part to a web part page in SharePoint Online.
To add the “Search result” web part, click on “Add a web part” on the web part page in the edit mode. Then click on the “Search Results” web part from the “Search” categories.

Configure search results web part sharepoint online
Let us see how to configure configure search results web part sharepoint online.
Now we will see how to display all last modified documents by the logged-in user. So for that edit that particular web part properties. In the “Properties for Search Result” page click on “Change query”.

Now build your Query page will open. In the Advanced mode select the “Documents(System)” from the drop-down. Then switch to the “Quick Mode“.

Quick mode page in the “Query text” add “ModifiedBy:{User.Name}”. Then clicked on “Test Query”, in the “Search Result Preview” we can see all the documents which is the logged in user modefied. Clicked on OK.

When we expand the “Settings” from the “Search result properties page” we will get the below option. We can set how many items we want to display on the page. Here I have set to 10 items.
In the down of settings page, we can see the “Show Paging” option. If we enable it then the search result is coming in the paging format. Here I have enabled it.

After the editing completed save the page. Now our web part page will look like below screenshort.

SharePoint search results documents filter by current user
Here we will see in the search result web part, how to display the documents which are created by the logged-in user or the current user.
Like the modified by the same thing can be followed here. In the “Query text”, I have added “CreatedBy:{User. Name}”. Clicked on “Test Query”. Click on Ok and save the page.

The below out put will come in the web part page.

Here, we learned how to use the SharePoint search results web part and how to display document filter by the current user.
- sharepoint search results
- sharepoint search results web part
- Search results web part in SharePoint online
- sharepoint online search results web part
- configure search results web part sharepoint online
You may like following SharePoint search tutorials:
- Documents are not showing up in Search Results in SharePoint 2013
- Disable content on a SharePoint site to be searchable
- The function Search has some invalid arguments in PowerApps
- SharePoint Online customize search box web part
- SharePoint search managed properties
- Difference between classic and modern search experience in SharePoint Online
Hope this SharePoint search tutorial helps to learn the content search web part in SharePoint Online or SharePoint 2016/2013 or SharePoint 2019.
We saw what is a content search web part? How can we add and configure a content search web part in SharePoint Online/2019/2016/2013? How to configure content search web part to display images from a particular SharePoint Online document library. Also, we will see how to use SharePoint search results web part or SharePoint online search results web part.
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”
Does this work on Modern site collections or only Classic?