Configuring SharePoint 2013 Search Topology



When creating the Search Service application , a default topology will be built automatically where all Search components are assigned to the server which is running the Central Administration, in multi servers farm scenario you need to change this topology , the only available way currently is through PowerShell which will provide more flexibility in configuring the topology, (you can NOT modify the topology through UI like you used to do with SharePoint 2010)



Sample Topology

I will guide you in this post on how to configure 5 servers as the following:

  • 3 front servers running the Query Processing component to handle search query requests from users, the query processing components will be located in the WFE servers.
  • 2 backend servers servers running the rest of Search components , The rest of search components will be located in the Application servers.
  • We will configure the below topology to have all Search components high available (no single point of failure for any components) , even the index partition will be replicated to the other server (replica)

you can refer to the below diagram to have better understanding for the topology we are about to configure:



Before you start

  • make sure that the current user who is going to execute the power shell is added as admin to Search service application


  • Make sure to run the below Powershell commands on the server that is hosting the Central Administration
  • from Central administration – Search Administration page , make sure the index files are empty , Searchable items appears as 0

now let us start by opening the powerShell on the server running the Central administration, make sure to execute all the below commands in the same PowerShell screen, but I have divided them in  below to make them more readable:

where SPAPP-SRV1, SPAPP-SRV2, SPWF-SRV1, SPWF-SRV2, SPWF-SRV3  are the server names

Prepare the topology variables

$hostApp1 = Get-SPEnterpriseSearchServiceInstance -Identity "SPAPP-SRV1"  

$hostApp2 = Get-SPEnterpriseSearchServiceInstance -Identity "SPAPP-SRV2"

$hostWF1 = Get-SPEnterpriseSearchServiceInstance -Identity "SPWF-SRV1"

$hostWF2 = Get-SPEnterpriseSearchServiceInstance -Identity "SPWF-SRV2"

$hostWF3 = Get-SPEnterpriseSearchServiceInstance -Identity "SPWF-SRV3"

Start-SPEnterpriseSearchServiceInstance -Identity $hostApp1

Start-SPEnterpriseSearchServiceInstance -Identity $hostApp2

Start-SPEnterpriseSearchServiceInstance -Identity $hostWF1

Start-SPEnterpriseSearchServiceInstance -Identity $hostWF2

Start-SPEnterpriseSearchServiceInstance -Identity $hostWF3


Get services status

Get Search Service Instance status (started or stopped) after running the above commands

Get-SPEnterpriseSearchServiceInstance -Identity $hostApp1
Get-SPEnterpriseSearchServiceInstance -Identity $hostApp2
Get-SPEnterpriseSearchServiceInstance -Identity $hostWF1
Get-SPEnterpriseSearchServiceInstance -Identity $hostWF2
Get-SPEnterpriseSearchServiceInstance -Identity $hostWF3


Setting up the topology

$ssa = Get-SPEnterpriseSearchServiceApplication

$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa


New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1


New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1


New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1


New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1


New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1 -IndexPartition 0



New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2


New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2


New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2


New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2


New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2 -IndexPartition 0



New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostWF1


New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostWF2


New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostWF3

#Activate the Topology

Set-SPEnterpriseSearchTopology -Identity $newTopology

# Verify the Topology 

Get-SPEnterpriseSearchTopology -SearchApplication $ssa

Comments (18)

  1. Issa Ayyash says:

    Hi Nik ,

    glad you liked the post, well runnning the search components on a dedicated search servers is absolutely much better … im my above post im assuming you dont have the luxury of having dedicated servers for search query processing, your assumption is correct to have query processing and Index on a seperate server together (if you can afford having more servers in your farm).  🙂  

  2. Hisham Taha says:

    thanks you very much, it is very clear and clean

  3. Issa Ayyash says:

    you should see the full commands now… check it

  4. Hi Issa, short and sweet write up with great explanation.
    I came across your blog today and have actually written a Search Topology PowerShell GUI for SP2013.

    It is only on V1 at the moment so some way to go still to handle Index partitions but it can be found on my blog.

    or directly


  5. Nik Patel says:

    Simply brilliant. Thanks for sharing.. You guys are quickly becoming my go to people in SharePoint farm administration..

    Quick Question… I like to run SharePoint 2013 all search components on dedicated application servers including query components.. with new SP2013 guidance around streamlined topology, it is recommended to run both query and index on same server and avoid running on WFEs due to distributed catche. What do you think about that? Any opinions?

  6. Nik Patel says:

    Thanks Issa.. that's exactly we are going for.. Thanks for reply..

  7. Rich says:

    All of the commands under the 'setting up the topology' section are truncated, rendering this post unusable.

  8. Nik Patel says:

    I would also suggest to add some pre-requisites e.g. Search Service Application is already provisioned (which you already suggested in your pre-reqs but may not be obvious to many). Additionally, what search services (e.g. host controller, search settings, and server search services) are started on which server before running this command.. it would make it much clear for readers to see what are starting point…

  9. rahul says:

    Very useful information. Thank you

    If anyone wants to look at SharePoint search 2013 architecture and configuration

  10. jmatk says:

    can't get it to work…got  one WFE and one APP….

  11. Shahrukh says:

    Useful info to understand Search topology…….. 🙂

  12. Lau says:

    I receive the "Sorry, something went wrong." when searching with details “The load balancer is not provisioned. Verify the load balancer was provisioned successfully before retrieving endpoint addresses.” I have re-created the Search Service Application
    several times already without success. The crawler was able to crawl the sites showing successful crawls. I do not see any account permissions or access issues in DB event logs and nothing looks out of place in the web front end and application server event
    logs also. I can see the full topology as well as all items in the search administration page. Prior to using the PowerShell code above to change the topology even when the Search Service Application was provisioned through the Central Administration with
    all search components on one server, I still saw the same error message regarding the load balancer after crawling completed. I used four accounts and they do not have any admin privileges. They were all registered as managed accounts prior to provisioning.

    In the ULS after the “UserAgent not available, file operations may not be optimized.” and a few other informational items, the most significant unexpected level is regarding the load balancer:

    Getting user preference failed: System.InvalidOperationException: The load balancer is not provisioned. Verify the load balancer was provisioned successfully before retrieving endpoint addresses.

    Any ideas on how to resolve this?

  13. Miloud says:

    i have the following error:

    Set-SPEnterpriseSearchTopology : Could not connect to the HostController service on server "My server" Topology Activation could not be


  14. Mafalda89 says:

    Thanks for the great article. I’m looking at an infrastructure just like yours, and I have some questions for you 😀
    1. My 3 WFE have 24 GB RAM is it ok to run the query processing there? My 2 App servers are 48 GB
    2. If I have to run the distributed cache service where would you locate it?
    3. Is it ok an alternative solution like:
    – 3 WFE + DistrCache + Web applications + All services a part from Search (24 GB each)
    – 2 Search servers with all search components on it (48 GB each)
    I know that this is totally different from what suggested..!

  15. Yazid says:

    DistrCache should be installed on sharepoint application server and on all web front end

  16. sam says:

    Hi Issa, thanks for your support.
    I follow to the $newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa , and get the error message, please help.

    New-SPEnterpriseSearchTopology : Cannot convert ‘System.Object[]’ to the type
    required by parameter ‘SearchApplication’. Specified method is not supported.
    At line:1 char:66
    + $newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa
    + ~~~~
    + CategoryInfo : InvalidArgument: (:) [New-SPEnterpriseSearchTopo
    logy], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Office.Server.Se

  17. Rajni says:

    Very nice Article,

    i would like to know how can i set my new topology and below is my SharePoint 2013 Infrastructure.

    Two Application Servers
    Two Web Front End servers and one SQL server

    Currently all the search components are running only on one Application Server and its causing high CPU utilization on Application server.

    Please suggest.


  18. Me says:

    Hi Issa,
    How can I add content deployment on each application server and make it HA(High Availability)?


Skip to main content