Modify Search Topology in SharePoint Server 2013

sharepoint searchThere are many differences between SharePoint 2010 and SharePoint 2013, not only an end user perspective, but also from administrator and developer perspectives as well. Let’s focus on one important administrative difference: Search Service Application.

So, for all of you SharePoint Administrators out there, we all know that Search is very simple – doesn’t use a lot of resources and once it’s provisioned, it just works, right? WRONG! Search is a beast; we all know that. But it gives us all job security, and if money wasn’t an issue, even the smallest organizations would have multiple servers just running Search.

Now, assume you have multiple application servers to run your Search Service Application. How do you move the search components to the application server(s)? With SharePoint 2010, you could do it through the Central Administration GUI. In SharePoint 2013? Not so much.

How do you modify the Search topology in SharePoint 2013?

Now, you now must use PowerShell. You can either use the SharePoint Management Shell or ISE. I prefer to use PowerShell ISE. It’s more colorful and much easier on the eyes. I’m going to walk you through the entire process.

The first thing I do is make sure the Index location is on the correct drive. It is always best practice to place the SharePoint bits, log files, and index files on a separate partition from the Operating System.

Step 1: Check Index File Location

  1. From the server that is currently running the Search Service, open PowerShell ISE.
  2. First and foremost, add the SharePoint Snapin in order to run the proper cmdlets. From the command line in ISE, type the following command. Press Enter.

    SharePoint Snapin
  1. Now, we can properly run the following commands using the script window in ISE. Type the following command, and click Run Script, as shown below.
    $ssi = Get-SPEnterpriseSearchServiceInstance

    Use Script Window in ISE
  1. This will display the following data. Note that both locations are located on the “S” drive, which is NOT the same drive that contains the Operating System.Located on the S Drive

Before we can start modifying the topology, we need to ensure that the Search Index is empty and that no crawls are currently running or scheduled to run during our modifications.

Step 2: Ensure Search Index is Empty and No Crawls are Running

  1. From the server that is currently running the Search Service, browse to Central Administration.
  2. From the Application Management section, click Manage Service Applications.Manage Service Applications
  3. Locate and click the Search Service Application.Search Service Application
  4. From the Search Service Application: Search Administration page, ensure that the Searchable Items shows “0Searchable Items
  5. Next, while still on the Search Administration page, select Content Sources from the Crawling section in the quick launch area.Content Sources
  6. On the Manage Content Sources page, verify that the status shows “Idle” and no crawls are scheduled to run in the near future.Idle Status

Now we can finally begin modifying the topology of the Search Service Application.

Step 3: Modify Search Topology

As stated above, you can either use PowerShell ISE, or the SharePoint Management Shell to perform the below functions. I prefer to use PowerShell ISE, so the screenshots shown below will be taken from it.

  1. From the server that is currently running the Search Service Application, open PowerShell ISE.
  2. The first thing we need to do is add a few variables in PowerShell. Use the following commands to specify each server you would like to add search components to. In this particular scenario, I have two Web Front End Servers and two Application servers. I will choose to run the Search components on both Application Servers. If you have more than two servers, the below script can be modified to add additional hosts.
    $hostA = Get-SPEnterpriseSearchServiceInstance -Identity "Server1"
    $hostB = Get-SPEnterpriseSearchServiceInstance -Identity "Server2"
    Start-SPEnterpriseSearchServiceInstance -Identity $hostA
    Start-SPEnterpriseSearchServiceInstance -Identity $hostB
  3. Once the above commands are ready (don’t forget to change the server names), select Run Script to input those variables.Run Script
  4. These commands will also start the SharePoint Server Search and Search Host Controller Service on each server you added. You need to ensure these services are Started before continuing. You can check by browsing to Central Administration > System Settings > Manage Services on Server. Be sure to have the correct server selected at the top of the page.
    Manage Services on Server
  5. You can also use the following commands and keep running them until each host Status displays “Online”.
    Get-SPEnterpriseSearchServiceInstance -Identity $hostA
    Get-SPEnterpriseSearchServiceInstance -Identity $hostB
  6. I prefer to keep all my commands on the page while performing this work. If you do the same, you will need to highlight the two new commands and use the Run Selection button instead of the Run Script button, as shown below.
    Run Selection
  7. Running the two above commands will display the following. Continue to run this command until all servers show “Status: Online”.
    Status Online
  8. You will now need to create an entirely new Search Topology. Using PowerShell ISE, type and run the following commands:
    $ssa = Get-SPEnterpriseSearchServiceApplication
    $newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa
    new Search Topology
  9. Now it is time to choose which search components you want to run on what servers. In this example, as I only have two application servers, I am going to split each component and have each server run all components. As you can see in the following commands, each server will host the same six components.
    New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
    New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
    New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
    New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
    New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
    New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostA -IndexPartition 0
    New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostB
    New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostB
    New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostB
    New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostB
    New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostB
    New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostB -IndexPartition 0

    host the same six components
  10. The above command essentially created the new topology. Now that it is created, we must activate this topology for the farm to use. Run the following command to active the topology.
    Set-SPEnterpriseSearchTopology -Identity $newTopology
    activate this topology
    This command could take a few minutes to run. The best way to tell when the command is complete is by watching the tool bar at the top. The red square indicates the command is still running. When the arrow switches back to green, the command has completed. Now that the new topology is activated, we can verify.
  11. Run the following command to verify the active topology.
    Get-SPEnterpriseSearchTopology -SearchApplication $ssa
    verify the active topology
  12. Use the command output to verify that the new topology is the active one. It should be the one with the most recent Creation Date, but you can also verify by using the Topology ID and match it up with the command output from step 9 above.Match Topology ID with the command output
  13. The following command can be used to verify each component of the search topology.
    Get-SPEnterpriseSearchStatus -SearchApplication $ssa -Text

Your output should be similar to the following:

Your Output

And there you have it! Your SharePoint’s Search Service topology is now configured in the proper way. Note that all the server names above contain the letters “AP” which refer to the Application Servers. No search component is running on either of the Web Front Ends.


2014-08-18T11:30:25+00:00 August 18th, 2014|


  1. Matt Kinder August 18, 2014 at 12:10 pm - Reply

    Joe Beyer is one of the smartest guys I have ever met. Nice work on this!

  2. Emmanuel ISSALY August 25, 2014 at 3:58 am - Reply

    You can’t explain better than that, good job 🙂

    Just as a note, you might also want to change the location of the index files stored by the index component, which isn’t shown here.

  3. Hans-Peter November 4, 2014 at 8:28 am - Reply

    Very good explanation, thanks a lot.
    But after running the commands and deploying the search components on a secondary application server. I have a problem with the new Crawl component on the secondary server:
    Name : CrawlComponent1
    State : Degraded
    State : Uninitialized
    I have used exactly the same configuration as in your description. Everything else seems ok.
    Any suggestions?

  4. CO April 14, 2015 at 1:57 am - Reply

    Brilliant post! Easy to follow for a newbie like myself.

  5. Niccollas July 12, 2016 at 3:09 pm - Reply

    Thank You!

  6. Umer November 7, 2016 at 7:25 am - Reply

    Great ! Thank You.

    Thank you so much 🙂

Leave A Comment