SharePoint 2019 - Cloud Hybrid Search

In this article, we will explore how we can configure Cloud Hybrid Search and search the content from on-premises on SharePoint Online.

Overview

 
Cloud hybrid search enables users to search the content from SharePoint on-premises in SharePoint Online. This provides users a seamless search experience with content being searched from on-premises and online at one place.
 
In this article, we will explore how we can configure Cloud Hybrid Search and search the content from on-premises on SharePoint Online.
 

Cloud Hybrid Search Overview

 
The content is crawled from SharePoint 2019 on-premises server and index is maintained at SharePoint online.
SharePoint 2019 - Cloud Hybrid Search
Image source: docs.microsoft.com 
 

Enable Hybrid Search Experience

  • Open SharePoint 2019 Central Administration site.
  • Click the link from green tool-tip “Click here to enable Hybrid experiences.”
SharePoint 2019 - Cloud Hybrid Search 
  • An executable file “HybridSPSetup.exe” will be downloaded to the file system.
  • Double click HybridSPSetup.exe to install.
  • The wizard will open to connect your on-premises SharePoint Server farm with your Office 365 tenant. Click Next.
SharePoint 2019 - Cloud Hybrid Search
  • In order to set up a hybrid environment for SharePoint or OneDrive for Business (OD4B), we need to provide administrator credentials for both SharePoint Server and Office 365. Click Next.
SharePoint 2019 - Cloud Hybrid Search
  • Pre-requisites check report will be generated.
SharePoint 2019 - Cloud Hybrid Search
 
In case of any errors regarding SPO365LinkSettings cmdlet, please follow the below steps and re-run SharePoint Hybrid Configuration Wizard.
  • Open SharePoint 2019 Management Shell with administrator privileges.
  • Run the below command

    Set-SPO365LinkSettings -MySiteHostUrl "http://mysites.contoso.com" -RedirectSites $true
SharePoint 2019 - Cloud Hybrid Search
  • In selecting the features to use in hybrid environment wizard, select Hybrid Search. 
SharePoint 2019 - Cloud Hybrid Search
  • Click “Input Parameters” next to Hybrid Search.
  • Enter the name of on-premises SharePoint server to host the cloud search service application.
  • In case you are planning for high availability (HA) search topology, enter the name of second on-premises SharePoint server. Leave the field empty otherwise.
  • Enter the name of on-premises SQL database server to host search data.
  • Enter name of cloud Search service application to create.
  • Download and install MS Online PowerShell for Azure Active Directory and Microsoft Online Services Sign-In Assistant by following the links.
  • Click OK.
SharePoint 2019 - Cloud Hybrid Search
  • Click Next. The configuration wizard will run.
SharePoint 2019 - Cloud Hybrid Search
  • After the successful running of configuration wizard, SharePoint server environment will be connected to Office 365. The summary report will be generated. Click Close. 
SharePoint 2019 - Cloud Hybrid Search
  • Perform IISReset on SharePoint Server 2019.

PowerShell Script Approach

 
Download Windows PowerShell scripts to configure cloud hybrid search for SharePoint from Microsoft Download Center.
 
The download contains 2 PowerShell scripts
  1. CreateCloudSSA.ps1: Creates Cloud search service application
  2. Onboard-CloudHybridSearch.ps1

Create Cloud Search Service Application

 
The cloud search service application crawls on-premises content for cloud hybrid search.
  1. Open SharePoint 2019 Management Shell with administrator privileges.
  2. Navigate to scripts folder.
  3. Execute CreateCloudSSA.ps1
SharePoint 2019 - Cloud Hybrid Search
 
Parameters used in the script,
  • SearchServerName: SharePoint On-Prem search installation server name
  • SearchServiceAccount: SharePoint On-Prem search installation admin account.
  • SearchServiceAppName: Name of the Cloud Search Service Application (SSA) to be created.
  • DatabaseServerName: SharePoint On-Prem database installation server name.
Search Service Account needs to already exist in Windows Active Directory. Script will add it as managed account, if it's not added already. Please note, only one cloud SSA is supported per SharePoint farm.
 

Connect On-Premises Cloud Search Service Application to Office 365 tenant

 
We can onboard SharePoint Online (SPO) tenant and SharePoint server cloud SSA to cloud hybrid search using PowerShell Script Onboard-CloudHybridSearch.ps1
  1. Open SharePoint 2019 Management Shell with administrator privileges.
  2. Navigate to scripts folder.
  3. Execute Onboard-CloudHybridSearch.ps1
SharePoint 2019 - Cloud Hybrid Search 
 
Parameters used in the script:
  • PortalUrl: SharePoint Online portal URL, for example https://contoso.sharepoint.com.
  • CloudSsaId: Name or id (Guid) of the cloud Search service application, created with the CreateCloudSSA script.
  • Credential: Logon credential for Office 365 tenant admin. Will prompt for credential if not specified.

On-Premises Cloud Search Service Application Configuration

 
Verify On-Premises Cloud Search Service Application
  1. Open SharePoint 2019 Central Administration site.
  2. Under Application Management, click Manage service applications.
  3. Verify Cloud Search Service Application exists.
SharePoint 2019 - Cloud Hybrid Search
 
Create Cloud Content Source
  1. Click Cloud Search Service Application.
  2. From left menu, under Crawling click Content Sources.
  3. Create new content source - Cloud Content
  4. Add SharePoint 2019 on-premises site under site addresses to crawl.
  5. Define incremental and full crawl schedule.
  6. Click OK.
  7. Run the full crawl manually for the first time.
SharePoint 2019 - Cloud Hybrid Search

Verify Hybrid Search

  1. Open SharePoint Online site.
  2. Search “IsExternalContent: 1” to see the external content (i.e. content from SharePoint 2019 on-premises).
SharePoint 2019 - Cloud Hybrid Search
 

Summary

 
The Hybrid Search can be enabled between SharePoint On-premises and SharePoint Online. The cloud search service application crawls on-premises content for cloud hybrid search.