Friday, June 2, 2017

Set up hybrid search with cloud search service application in SharePoint 2016

I followed this TechNet article, and did a quick test of cloud search service application on my SP2016 dev VM and my MSDN office 365 tenant.

Below are the steps.
  1. Go to GoDaddy and bought a domain, say "abcd.com"
  2. Go to Office 365 admin center, add "abcd.com" by following this support article
  3. Update domains for all users in Office 365 tenant
  4. On the AD domain controller which the SP2016 dev VM connects to, create a domain with the same name "abcd.com", and create same users as Office 365 tenant including the login user
  5. Install AzureAD Connect on the AD domain controller by following this doc, then kick of an express sync
  6. Make sure SharePoint 2016 is healthy
  7. On SharePoint 2016 server, Microsoft Online Services Sign-In Assistant for IT Professionals RTW and Azure Active Directory Module for Windows PowerShell
  8. Download Cloud_Hybrid_Search_Scripts.zip from MS Download Center 
  9. Provision cloud search service application. Open PowerShell console, and run .\CreateCloudSSA.ps1 -SearchServerName "{Search Server Name}" -SearchServiceAccount "{Domain\ServiceAccount}" -SearchServiceAppName "{Name of SSA}" -DatabaseServerName "{Name of SQL Server}"
  10. On board cloud SSA to Office 365 tenant. Open PowerShell console, and run .\OnBoard-CloudHybridSearch.ps1 -PortalUrl "{SharePoint Online tenant root Url}" -CloudSsaId "{cloud SSA application id}" -Credential {PSCredential object for Office 365 login account (usually global admin account)}
  11. Create a content source in SharePoint 2016 with local web application urls as start addresses, then kick off a full crawl
  12. Create a new search center, and associate it to cloud SSA
  13. In SharePoint central admin, open cloud SSA, and click "Result Source", then click "New Result Source", on "Add Result Source" page, do following. Make it default result source.
  • In the General Information section, in the Name text box, type a name for the new result source—for example, Office 365 search index.
  • In the Protocol section, select Remote SharePoint.
  • In the Remote Service URL section, type the address of the root site collection inSharePoint Online that you want to get search results from, such as https://adventure-works.sharepoint.com.
  • In the Type section, select SharePoint Search Results.
  • In the Query Transform section, keep the default setting.
  • In the Credentials Information section, select Default Authentication.
  • Click OK to save the new result source.
Now, if I go to my Office 365 SharePoint online search center, or my on-premises search center, I can see same search result. 

No comments:

Post a Comment