In the last project, I was assigned to build and configure the search center. Thanks to teammates’ help and googling, I’ve get more and more familiar with search center.
When you want to query from one certain type of content, using result source is one of your good choices. In this blog I will demonstrate how to create a result source.
You can set up result sources in 3 different levels: search service application, site collection, and site. In my case, I’ll do it in search service application.
Go to Search Service Application in CA, click “Result Sources” in the left navigation panel, you can see there are already 16 result sources “Provided by SharePoint” (Figure 1), and they are not editable (In fact you can copy them and change the settings, if you are not familiar with result source, you can copy one and do further customization).
Choosing a Global Software Development Partner to Accelerate Your Digital Strategy
To be successful and outpace the competition, you need a software development partner that excels in exactly the type of digital projects you are now faced with accelerating, and in the most cost effective and optimized way possible.
Now it’s time to create a result source. Click “New Result Source”, specify Name and Description, in Query Transform section, click “Launch Query Builder” button, and in the popup window, you can build your query to filter out the kind of results you want. In my case, I want the result come from a specific Content Source, and the result should not be a container (folder).
In the Query Builder Tool, you can see there are two kinds of filters: Keyword filter and Property filter. If you are not familiar with how to build the query, you can try to use the two helpers. More information about keyword query you can click here.
After building the query, click OK to save it. You’ll be back to Edit Result Source page, leave all other fields with default value, and then click “Save” button to save your result source.
Now, you can use your result source, for example, in search results web part.