How to Limit Search Results to a Desired Content Source for Microsoft SharePoint 2016

How do we create a result source for limiting search results only from a desired content source in Microsoft SharePoint 2016? Read more to find out..

Here’s our latest blog on SharePoint Search. Let’s say the Finance Team requires a standalone search feature for sharing their audit documents (confidential documents). In SharePoint 2010, there is a provision to create search scope and added rules for including the specific content source into it.
In SharePoint 2013, the search scopes are replaced by result sources. So how do we create a result source for limiting search results only from a desired content source in Microsoft SharePoint 2016?

Read more to find out:

Before getting started, you need to configure couple of things:
1. The content source is generated for indexing specific file share with name “FileShare”. The full crawl should be completed by then.
2. A subsite created with “Basic Search Center” template to SharePoint server as dedicated search center.


Setting up Search Result Source for limiting results to Content Source


The result sources are built on 3 different levels:

a. Site Collection
b. Search Service Application
c. Site

So how can you restrict SharePoint Search for restricting results only from the desired content source?

Checkout the following steps:

1. Open Search Center Site that you have created earlier. Select the gear button -> Site Settings -> Select Result Sources (Under the Search group).
2. Click on New Result Source under Manage Result Sources page.
3. Provide a name to the Result Source and if required, give a description. This will be seen under Add Result Source page. Leave option buttons for protocol as Local SharePoint and type SharePoint Search Results. Select Launch Query Builder button.
4. Now you get to see the query builder popup. Under property filter drop down, choose “Show All Managed” properties and select property filter again. Now you will be able to see a property “ContentSource”. Select that and choose Equals as a condition. Select Manual Value as value selector.
5. Fill in the value of content source name. According to our scenario, type “FileShare” and hit on the Add property filter button. Click OK and close Query Popup.

Fileshare_Settings_2

You can also manually write the query for limiting search results. Select Save to complete the result source.

Query_Transform

You have created Result Source now. The next step is to configure your search results page for using this result source.

Configuring Search Results Web Part for Using Result Source

The next step is to configure search results page for using result source created in the previous step.

  • Move towards the Search Center Site and search results pages.
  • Select the Gear button and choose Edit Page
  • Select edit the Search Results Web Part and select the Change query button.

Search_Results_Web_Part

  • Under Select a query – select result source you have generated. In the scenario we have created, “FileShare” is the query you need to select. This will configure the filter on search results web part. Select OK and save the changes. Click on Stop Editing this page” to enable search results page.

Tadaa! All set now! Time for some search query testing! Go ahead and search for terms and verify the search results from desired content source.

Table of contents

Read more blogs

See all

SharePoint & Microsoft 365 (Product Tips & How-Tos)

5 Benefits a Best Intranet Portal Software Do for Businesses

Know about the 5 Benefits a Best Intranet Portal Software can do for your Business. Learn more about how a best intranet portal software should be.

Read more

SharePoint & Microsoft 365 (Product Tips & How-Tos)

How To Manage User Profiles in SharePoint Admin Center

Learn how to easily manage user profiles in SharePoint Admin Center

Read more

Contract Management Strategy

Why CFOs Need Smarter HVAC Contract Management

CFOs face silent losses in HVAC contracts. Smarter management delivers predictability, risk reduction, and measurable ROI across every agreement.

Read more

Less time on contracts, complete control over them.

Automate contract tracking and renewals, connect every agreement to its vendors, invoices, and projects, and get full visibility with enterprise-grade security built in.

Our contract process didn't fit neatly into the rigid workflows offered by many vendors.

Dock 365 was the last vendor I looked at, but it quickly became clear it was the right fit

Jennifer McGaffey

Legal Operations Manager, Short Elliott Hendrickson