Configure Open Search in SharePoint

In SharePoint 2013 we can search data from various result sources such as Exchange, Remote SharePoint and open search (various search engines).

Create a search site

To create a search site in SharePoint 2013 go to New -> Private site Collection.

Click on the Enterprise Tab and select Enterprise Search Center.

Enterprise Tab

Give it a name, let's say “Search”. That creates a search site that gives search results from local SharePoint.

Search

If we enter some keyword, let's say SharePoint, in the search box then that gives search results from SharePoint as depicted in the following screenshot.

SharePoint

All results displayed above are from the local SharePoint, however if we want to search data from any open search provider (such as Bing or Google) then we need to configure new result sources (result sources are the provider to get search results from).

To configure a search result go to Site Settings on the upper-right corner of the page.

Search result

Click on the Result Sources to define a new result source.

Result Sources

After clicking on New Result Source select the OpenSearch option as displayed below. Give the result source a name, say “using open search”.

OpenSearch

Provide the source URL value as: Bing: SearchTerms then click OK. Now you have created your result source that will provide results from the Bing search engine.

Go to site setting and click on Query Rules as shown.

Query Rules

After clicking on query rules the following pages open in which you need to select your own search result created by you in the preceding procedure (in my case it is “UsingOpenSearch”), then click on New Query Rule to define the query.

UsingOpenSearch

Provide the rule a name and provide keywords in the Query to exactly match one of these phrases (semi-colon separated) in the text box such as "SharePoint; Documents; Notebook; PowerPoint".

Click on Add Result Block, to display an open search result in one block.

Add Result Block

Append Open search result in the Result Block title (to give a friendly name to the result block) and configure the query (if you want to append something to the start or end of the search term, otherwise leave it as it is).

Select your Search Result Source from the dropdown below the Configure Query text box, in other words in my case it is “usingOpenSearch”. Select the More Links radio button and provide the URL as “Bing: {SearchTerms}”.

Select the number from the dropdown to display the result items count.

number from dropdown to display

Click OK and save the settings.

Go to the Search home page and search. It then will display as:

Search home page