Skip to main content

Development

How to create result source in SharePoint 2013

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.

Reference: http://technet.microsoft.com/en-us/library/jj683115.aspx

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).

01

 

 

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).

02

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.

03

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sherlock Ma

More from this Author

Categories
Follow Us