A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Sunday, August 10, 2014

SharePoint 2013 Search - Part 2

Federated Search

SharePoint search provides two approaches for processing queries to return search results. One is content crawling and the other is federated search. Let me remind you, if you are an experienced SharePoint user and have used SharePoint 2010, that just like “Search Scopes”, “Federated Search” terminology is extinct in SharePoint 2013.


You can still do what you used to do with Federated Search in SharePoint 2010, but that term is non-existant in SharePoint 2013 but regardless concept stays the same. In content crawling, results are returned from the search service application’s content index based on the query. The content index contains content that is crawled by the search service application and includes text content and metadata for each content item. In federated search, you are enabled to display search results from sources other than SharePoint. This content is not crawled by your search server.  With federation, the query can be performed over the local content index, or it can be forwarded to an external content repository where it is processed by that repository’s search engine.

Advantages of using federated search are many. You require no additional capacity requirements for the content index as content is crawled by external entity. You can take advantage of a repository’s existing search engine. You can federate to an Internet search engine to search the web. You can access repositories that are secured against crawls but which can be accessed by search queries.

Below, you will learn to set up federated search that will return results from Bing search engine.

Setup Bing Search

1. Open SharePoint Central Admin site.

2. Click General Application Settings.

3. Click Farm Search Administration.

4. Click Search Service Application link.

5. Click Result Sources under Queries and Results.

6. Click on New Result Source.

7. Enter Bing in Name box. Select OpenSearch 1.0/1.1 in the Protocol section. In Query Transform, copy the following URL. Also copy this URL in the Source Url. In Credentials information, select Anonymous. Click Save.

http://www.bing.com/search?q={searchTerms}&go=&form=QBLH&qs=n&format=rss

8. Go to SharePoint search center site that you created above. Add a new page and name it BingSearch (bingsearch.aspx). Add another page and name it Bing Search Results (bingsearchresults.aspx).

9. Add Search web part to the page. Edit web part properties.  Select Send queries to a custom results page URL and /searchcenter/Pages/bingsearchresults.aspx. Remove the querystring appended automatically at the end of the URL (if you just replaced the url part otherwise if you overwrote the whole url then querystring will not be there).  Click OK. Click Save button in the ribbon.

10. Go to bingsearchresults.aspx page and add Search Results web part. Edit web part properties. Click Change Query button. Select Bing (Service) from the select a query drop down. Click OK. Click Save button in the ribbon.

11. Go to bingsearch.aspx page and enter a search term and click search. You will see results from the web via Bing search engine.

You can set up search to retrieve results from Google, Youtube, Live, Twitter, and other sources. Follow the steps above and use relevant search query when setting up Result Source. You can stylize the results in the Search Results web part.

Search External Data Sources

Did you know with SharePoint you could search external data sources as well? You can search PHP sites, you can search line of business data, you can search files and folders on the server. Is there any other search tool that gives you much power and control? SharePoint comes with built-in mechanism and power to perform searches on all kinds of data sources. All you have to do is set it up. In this section, you will learn to configure some more search types, for example, searching PHP sites (both internal and external), searching folders, etc.