What is cloud hybrid search
Before cloud hybrid search, Microsoft provided hybrid search scenarios between your on-premises SharePoint environment and SharePoint Online. These solutions were based on query federation. For instance, when you searched for a document in SharePoint Online in your on-premises environment, the query would be sent to the on-premises environment, and the results are returned back to the user in SharePoint Online. Microsoft released a script to automate this: http://blogs.msdn.com/b/spses/archive/2015/11/17/office-365-sharepoint-hybrid-configuration-wizard.aspx.

Instead of using query federation to surface results in your environment, it relies on indexing your on-premises content in Office 365. This takes away a lot of complexity setting it up, and makes it possible to mix results from SharePoint on-premises and Office 365 in a single result block. You can set up this new feature using SharePoint 2013 or SharePoint 2016.

In this old scenario, the user enters a query in the on-premises search center. SharePoint sends the query to the on-premises query component and the SharePoint Online query component. Results cannot be interleaved out-of-the-box in this scenario, as there are separated indexes for SharePoint on-premises and SharePoint Online. However, there are several third-party solutions available that make it possible.

Figure 2: New cloud hybrid search architecture

In this scenario, the cloud search service crawls the content sources on-premises and sends the parsed content to the SharePoint Online content processing component. After processing the content and doing ACL mapping – for security trimming purposes – the data is saved in the SharePoint Online index. Because the index is saved online, it is now possible to interleave results in your search results and use the data in Delve.

If you want your on-premises SharePoint to show SharePoint Online results, you have to configure a remote result source in your SharePoint on-premises server. This makes sure your on-premises farms uses the SharePoint Online index. This is described later in this post.

Why cloud hybrid search
Not all companies are ready to make the move to the cloud for all their workloads. In order to help customers make the move for specific workloads, Microsoft now provides an easy way to gradually move to the cloud while maintaining a great search experience for end users.

By using the new Cloud hybrid search solution, users are able to search content from the following sources from within SharePoint Online:

SharePoint 2007/2010/2013/2016

File shares

BCS

The index for all these sources is indexed in Office 365, which gives Microsoft the ability to interleave results across sources based on relevancy, use the Office 365 ranking model and even include all of this in Delve!

Organizations can also scale down search infrastructure as content processing and analytics are handled by Office 365.

Prerequisites for cloud hybrid search
In order to use the new Hybrid search functionality, make sure you have installed the following prerequisites for your environment.

SharePoint on-premises

If you use SharePoint 2013, make sure you installed the August 2015 CU or later. I recommend the latest CU without known regressions, as there have been improvements to the hybrid search.

Public preview of SharePoint 2016 IT Preview.

Office 365
All users that want to benefit from these new hybrid capabilities need to have an active SharePoint Online license in Office 365.

Account synchronization
Accounts need to be synchronized to Office 365 in order to have a single identity for users.

If you do not have any of the above synchronization tools deployed in your environment, I recommend using AADConnect. AADConnect can configure the full Single-sign on experience for you just by specifying server names on which it should deploy ADFS.

Software needed during configuration of hybrid search
On the SharePoint server where you are performing the configuration of hybrid search, you will need to install the following prerequisite software in this specific order.

Onboarding script
The onboarding script will create the trust between your on-premises SharePoint environment and Office 365. You can download the script along with documentation from the Microsoft Download Center.

Creating the cloud search service application
After you have installed all the prerequisites, it’s now time to create the cloud search service application, which is pretty straightforward. You could use any script that you prefer; just add the parameter, “CloudIndex $true” to the New-SPEnterpriseSearchServiceApplication cmdlet.

On the server that is running SharePoint Server 2013 or SharePoint Server 2016 Preview, copy the sample script below and save it as CreateCloudSSA.ps1 and run it. This will create a single-server Search Service Application topology. If you want a highly available search service infrastructure, you have to manually adjust the script to your needs.

The output should look similar to figure 3.Figure 3: Create-SSA.ps1 output, creating a cloud search service application

Proxy configuration for hybrid cloud search
If your organization uses a proxy to allow Internet access, you have to configure this proxy for hybrid cloud search as well. For a more in-depth article, please look at https://sharepointrelated.com/2015/12/11/cloud-hybrid-search-proxy-settings/, but for now we can just add the proxy settings to the machine config: “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config”

Place this anywhere between your and tag. To make it easier to find when you need it, you could place it right before the tag.

Onboarding the cloud search service application
After successfully installing the prerequisites and configuring the cloud search service application, it is time to start the onboarding process. The onboarding process will create a trust between your SharePoint on-premises and Office 365 environment. This will allow SharePoint to move the index to Office 365 for further processing.

The script name and the parameters have changed a bit since I ran the script. Make sure you check to see what the correct parameters are when you run the script.

Configure content source in cloud search service application
You can configure the content source in your new cloud search service application as you would in any other on-premises SharePoint environment. As Figure 5 shows, you configure the content source of the cloud search service application in Search Administration.Figure 5: In SharePoint Search Administration you can edit (configure) the content source for the cloud search service application.

Enter the start addresses that you would like to crawl and start a full crawl for the content source. After the crawl is done, check the crawl log for the specific content source to see if all went well.Figure 6: Check the crawl logs for any errors or warning

Configure your on-premises farm to use the SharePoint Online index
In order to use the SharePoint Online index in your on-premises farm, you have to configure a remote result source. This can be done by following this article: https://technet.microsoft.com/en-us/library/mt668455.aspx.

Verifying results: perform a query in SharePoint Online and SharePoint on-premises
In Office 365, search for a document and it will return results for both SharePoint Online and SharePoint on-premises if cloud hybrid search is configured correctly.

Figure 7 shows example results from a search that includes the following sources:

If you want to return results only from your on-premises site, you can use the “isexternalcontent:1” property.

As figure 8 shows, this returns only on-premises results.Figure 8: Using the isexternalcontent:1 property shows search results only from on-premises.

Conclusion
The new cloud hybrid search solution is a great way to provide a great end-user search experience, wherever the information is stored. In just a few hours, your users will be able to benefit from this new feature. If you have any problems while configuring the new cloud hybrid search capabilities, you can reach Microsoft directly by using the Cloud Search Service Application Preview forum: https://social.technet.microsoft.com/Forums/office/en-US/home?forum=CloudSSA.

I have followed all the steps and it is working well in tandem. Sometimes my items get crawled and sometimes i get the proxy authentication required logs. Is there anything i am missing for this intermittent behavior.

First I’d like to thank you for the great detailed article! I do have Hybrid Search in place and everything’s been working fine so far. The thing is we no longer need it as we’ve migrated our content to the cloud and I’m now looking at the best way to retire the cloud hybrid search. Apart from deleting the SVC App and removing the on-prem farm, is there something I need to do in Office365/Azure in order to fully de-provision it? I’m looking at the onboarding script and

Is there anything that has to be done in Offfice365/Azure AD when decommissioning Hybrid Search? Apart from modifying result sources, of course, is there anything that has to be removed after that – for example cleaning configuration leftovers and also cleaning the index from any on-prem content?
Thanks in advance!

Hey Nico, thanks a lot for this article! I have a question and might say a silly question: What would I need to do to configure SP16 to search from O365 to on prems index in 2016? I have a customer requesting this type of architecture, the enterprise search center in O365, no index in O365 only in on prems. Do they need reverse proxy? do they need to create a CSSA as well? thanks

Not a silly question at all. Using the Cloud Search Service Application only allows you to store the index in Office 365.
It is not possible to have NO index in Office 365 while still being able to retrieve results from both SP2016 and Office 365.

I would advise to use the new Cloud Search Service Application (Index in Office 365), unless there are regulatory reasons not to.
Setting up hybrid federated search is much more complex (includes a reverse proxy)