Start with SharePoint Result Source

Result Sources were introduced in SharePoint 2013 first as the alternate of search Scopes from SharePoint 2010. With the help of Result Sources, SharePoint search can be configured in more established way. Even in SharePoint Server 2019 Public Preview, the modern search experience gets its results from the default result source. If we change the default result source, it will impact the modern search experiences as well as the classic one.
Result Source is a subset of specific type of content which are being used to limit search results. It can be used for Content Type or Sub-site.

List of default SharePoint Result Source IDs

Although the Result Source feature in SharePoint is cool, writing queries against them is not. Previously with scopes, these could be specified by name (i.e.: All Sites or People), but with result sources, must be specified by the id. That’s made it tricky to develop custom coded solutions.  Luckily, it turns out that the IDs of the built-in result sources are all the same except for the Conversations result source.  In comparing an on-premises installation of SharePoint 2013 with a SharePoint Online Preview tenant, here is the list I came up with.  Hopefully, it will save some time to write a query.

Result Source ID
Documents e7ec8cee-ded8-43c9-beb5-436b54b31e84
Items matching a content type 5dc9f503-801e-4ced-8a2c-5d1237132419
Items matching a tag e1327b9c-2b8c-4b23-99c9-3730cb29c3f7
Items related to current user 48fec42e-4a92-48ce-8363-c2703a40e67d
Items with same keyword as this item 5c069288-1d17-454a-8ac6-9c642a065f48
Local People Results b09a7990-05ea-4af9-81ef-edfab16c4e31
Local Reports and Data Results 203fba36-2763-4060-9931-911ac8c0583b
Local SharePoint Results 8413cd39-2156-4e00-b54d-11efd9abdb89
Local Video Results 78b793ce-7956-4669-aa3b-451fc5defebf
Pages 5e34578e-4d08-4edc-8bf3-002acf3cdbcc
Pictures 38403c8c-3975-41a8-826e-717f2d41568a
Popular 97c71db1-58ce-4891-8b64-585bc2326c12
Recently changed items ba63bbae-fa9c-42c0-b027-9a878f16557c
Recommended Items ec675252-14fa-4fbe-84dd-8d098ed74181
Wiki 9479bf85-e257-4318-b5a8-81a180f5faa1

 

Using Default Result source

Above result source are being able to use at the Search service application level, site collection level, or site level. To search in the result source, there are four protocols specified which are Local SharePoint, Remote SharePoint, OpenSearch 1.0/1.1, Exchange. Other than “Local SharePoint” protocol, need to specify a URL to get search result from Result Source.

Protocol Name URL Details
Remote SharePoint The address of the root site collection of the remote SharePoint Server farm
OpenSearch 1.0/1.1 The URL of the RSS feed of a search provider that uses the OpenSearch protocol
Exchange An Exchange Web Services URL

Conclusion

As a developer point of view, these predefined Result source can be used to minimize the effort in different type of search query. And by creating custom result source will help to get required query execution in a minimal effort.

Points of Interest

This article has used the following articles or blogs as source of information: Understanding result sources for search in SharePoint Server

Leave a Reply

%d bloggers like this: