SharePoint 2013/2016: Migrating Search Service to Another Server

Published on
3 mins read
--- views

Moving the search service from one server to another in SharePoint is a common task, especially on older and larger projects. If you cannot scale the resources of the old search app server, the only way to make it work properly is to move the service to another, more powerful server. This guide will help you do that.

Existing Topology:

SharePoint 2016 farm:

  • WEB - Web Server (FrontEnd, ...)
  • APP - Application Server (SearchService, ...)
  • APP-2 - New Application Server (SearchService, ...)
  • ...

Task:

Move SearchService from APP to the new and more powerful computer APP-2.

Instructions:

  1. Clone existing search topology. Use this instruction in powershell:
  $ssa = Get-SPEnterpriseSearchServiceApplication
  $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
  $clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -SearchTopology $active
  1. In virtual clone of service topology ($clone) add new search components:
  • New-SPEnterpriseSearchAdminComponent
    New-SPEnterpriseSearchAdminComponent -SearchTopology $clone -SearchServiceInstance <GUID>
    # <GUID> - id of SearchService on new application server
    ```
- New-SPEnterpriseSearchAnalyticsProcessingComponent
```powershell
    New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $clone -SearchServiceInstance <GUID>
    # <GUID> - id of SearchService on new application server
    ```
- New-SPEnterpriseSearchContentProcessingComponent
```powershell
    <pre class="lang:ps" decode:true="">New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $clone -SearchServiceInstance <GUID>
    # <GUID> - id of SearchService on new application server
    ```
- New-SPEnterpriseSearchCrawlComponent
- ```powershell
    New-SPEnterpriseSearchCrawlComponent -SearchTopology $clone -SearchServiceInstance <GUID>
    # <GUID> - id of SearchService on new application server
    ```
- New-SPEnterpriseSearchQueryProcessingComponent
```powershell
    New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $clone -SearchServiceInstance <GUID>
    # <GUID> - id of SearchService on new application server
    ```
- New-SPEnterpriseSearchIndexComponent
```powershell
    <pre class="lang:ps" decode:true="">New-SPEnterpriseSearchIndexComponent -SearchTopology $clone -IndexPartition 0 -SearchServiceInstance <GUID> -RootDirectory <PATH>
    # <GUID> - id of SearchService on new application server
    # <PATH> - local path where search index will be stored on new app server
    #    example: C:\SearchIndex
    ```
3. Activate new search topology
```powershell
Set-SPEnterpriseSearchTopology -Identity $clone

And verify, is new topology set correct:

Get-SPEnterpriseSearchTopology -Active -SearchApplication $ssa
  1. Check that everything is correct in SharePoint Central Admin. Go to Search Service Application administration and look at the top menu with service topology. There will be two identical app servers with the same search components.
  1. Clone the search topology again (step 1).
  2. Remove search components located on the old app server:
    • SearchAdmin
    • SearchAnalytics
    • SearchContent
    • SearchCrawl
    • SearchQuery
    • SearchIndex
    Remove-SPEnterpriseSearchComponent -Identity <GUID> -SearchTopology $clone
    # <GUID> - id of old search service component
    
  3. Activate the search topology again (step 3).
  4. Check (step 4). Now there should be only one search server (new APP-2).
  1. Run a full crawl in SharePoint Admin Center → Search Application Management → Content Sources.