Manage result sources

Result sources limit searches to certain content or to a subset of search results. You can also use result sources to send queries to external providers such as Bing.

A SharePoint Online administrator can manage result sources for all site collections and sites in that instance of SharePoint Online (tenant). A site collection administrator or a site owner can manage result sources for a site collection or a site, respectively.

You can create your own result sources, or use the predefined result sources. After you create a result source, you configure Search Web Parts and query-rule actions to use it.

Create a new result source

  1. Go to the Manage Result Sources page for the tenant, for a site collection, or a site:
  • For the tenant:

    Log in to Office 365.

    Select the app launcher icon The app launcher icon in Office 365 in the upper-left and choose Admin to open the Office 365 admin center. (If you don't see the Admin tile, you don't have Office 365 administrator permissions in your organization.)

    In the left pane, choose Admin centers > SharePoint.

    Click search, and then on the search administration page, click Manage Result Sources.

  • For a site collection: In your site collection, go to Settings, click Site settings and then under Site Collection Administration, click Search Result Sources

  • For a site: On your site, go to Settings, click Site settings, and then under Search, click Result Sources.

  1. On the Manage Result Sources page, click New Result Source.

  2. In the General Information section, type a name and a description for the new result source.

  3. In the Protocol section, select one of the following protocols for retrieving search results:

  • Local SharePoint, the default protocol, provides results from the search index of this tenant (Search Service)

  • Remote SharePoint provides results from the index of a search service in a different farm (external source). In the Remote Service URL box, type the address of the root site collection of the remote SharePoint farm.

  • OpenSearch 1.0/1.1 provides results from a search engine that uses the OpenSearch 1.0/1.1 protocol.

  • Exchange provides results from Microsoft Exchange Server. Click Use AutoDiscover to have the search system find an Exchange Server endpoint automatically, or type the URL of the Exchange web service to retrieve results from — for example, https://contoso.com/ews/exchange.asmx

    Note

    The Exchange Web Services Managed API must be installed on the computer where the search service is running.

  1. If you choose Local SharePoint or Remote SharePoint for protocol, choose a Type:
  • SharePoint Search Results to search the whole index.

  • People Search Results to search in people profiles and enable query processing that is specific to people search, such as phonetic name matching or nickname matching.

  1. In the Query Transform section, you can change incoming queries to use a new query text instead. Choose one of these options:

  2. Leave the default query transform ( searchTerms) as is. The query will be unchanged since the previous transform.

  3. Type a different query transform in the box. See Understanding query transforms.

  4. Build your own query. Click Launch Query Builder and build your query by specifying filters on the BASICS, sorting on the SORTING tab, and then testing the query on the TEST tab. Each of these tabs are described in the following sections.

  5. In the Credentials Information section, choose an authentication type for users to connect to the result source.

  6. Click Save.

The BASICS tab

Choose this option To do this
Keyword filter
Use keyword filters to add predefined query variables to the query transform. Select query variables from the list, and add them to the query by clicking Add keyword filter.
Property filter
Use property filters to query the content of managed properties that are set to queryable in the search schema.
Select managed properties from the Property filter list. Click Add property filter to add the filter to the query.
NOTE: Custom managed properties are not shown in the Property filter list. To add a custom managed property to your query, in the Query text box, enter the name of your custom managed property followed by the query condition, for example MyCustomColorProperty:Green

The SORTING tab

Choose this option To do this
Sort results
Define sorting for results. The Sort by list contains managed properties that are set as sortable in the search schema.
Select a property to sort by, and then select Descending or Ascending. To sort by relevance, select Rank.
Click Add sort level if you want to specify more levels of sorting.
Ranking model
If you selected Rank from the Sort by list, choose the ranking model to use for sorting.
Dynamic ordering
Click Add dynamic ordering rule to specify additional ranking by adding rules that change the order of results within the result block when certain conditions are met. You can add conditions by choosing from the lists that appears.

The TEST tab

Choose this option To do this
Query text
See the final query text, which is based on the original query template, the applicable query rules, and the variable values.
Show more
Click the link to show more options.
Query template
See the query as it is defined in the BASICS tab or in the text box in the Query transform section on the Add Result Source page.
Query template variables
Test the query template by specifying values for the query variables. Click Test query to see the results.

Set a result source as default

The default result source is Local SharePoint Results, but you can choose to set a different one as the default. By doing this, it will be easier to edit the query in Search Web Parts. For example, when you add a Content Search Web Part to a page, the Web Part automatically uses the default result source.

  1. Go to the Manage Result Sources page for the tenant, for a site collection, or a site:

    For the tenant:

  2. Sign in to Office 365 as a global admin or SharePoint admin.

  3. Select the app launcher icon The app launcher icon in Office 365 in the upper-left and choose Admin to open the Office 365 admin center. (If you don't see the Admin tile, you don't have Office 365 administrator permissions in your organization.)

  4. In the left pane, choose Admin centers > SharePoint.

  5. Click search, and then on the search administration page, click Manage Result Sources.

    For a site collection:

    In your site collection, go to Settings, click Site settings and then under Site Collection Administration, click Search Result Sources.

    For a site:

    On your site, go to Settings, click Site settings, and then under Search, click Result Sources.

  6. On the Manage Result Sources page, point to the result source that you want to set as the default, click the arrow that appears, and then click Set as Default.

See also

Understanding result sources

Understanding query transforms