we are using SP 2016 Enterprise On-Premises Search application , in development environment - used standalone machine with all the components in the same box.

But while decided to go for production, we have got only two servers into which need to configure our search application.

In this case, how I have to design search application topology in both server?

Do I need to install SharePoint in both machines to get search application components installed in both?

while using PowerShell scripts to split the components (Crawler, Index Partition, Analytics, Admin,Content Processing, Query Processing) in both these machines, what are all the prerequisite to be considered.

Please enlighten me on these.

1 Answer 1


For your production SharePoint farm with two servers, you'll need to install SharePoint onto both servers. Once you've created your search service application, you need to configure the search topology. In your case, to achieve fault tolerance, you'll want to run all search roles on both servers. This allows one of the servers to go off-line while retaining all search functionality for your end users.

Some sample PowerShell to create the topology you want is:

# Set up some variables
$hostA = Get-SPEnterpriseSearchServiceInstance -Identity "ServerA"
$hostB = Get-SPEnterpriseSearchServiceInstance -Identity "ServerB"

# Start the enterprise search service instance on all hosts that are to run search components
Start-SPEnterpriseSearchServiceInstance -Identity $hostA
Start-SPEnterpriseSearchServiceInstance -Identity $hostB

# Run the following commands until all instances return 'Active' to ensure that the service instance is running on all servers
Get-SPEnterpriseSearchServiceInstance -Identity $hostA
Get-SPEnterpriseSearchServiceInstance -Identity $hostB

Write-Host "Waiting for search service instances to come online..." -NoNewLine
While (($hostAStatus.Status -ne "Online") -or ($hostBStatus.Status -ne "Online")) {
    write-Host "." -NoNewLine
    start-sleep 5
    $hostAStatus = Get-SPEnterpriseSearchServiceInstance -Identity $hostA
    $hostBStatus = Get-SPEnterpriseSearchServiceInstance -Identity $hostB
Write-Host "Done!"

# Get the search service application and clone the topology that we have
$ssa = Get-SPEnterpriseSearchServiceApplication
$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa

# Add all components on ServerA
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

# Add all components on ServerB
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

# Set the search topology to be that created above
Set-SPEnterpriseSearchTopology -Identity $newTopology

# Get the search topology to check that we have what is expected    
Get-SPEnterpriseSearchTopology -SearchApplication $ssa

# Get the status of the enterprise search components    
Get-SPEnterpriseSearchStatus -SearchApplication $ssa -Text

Note: You can also use the -RootDirectory parameter in the New-SPEnterpriseSearchIndexComponent command to specify the location for storage of the query index files on disk. This location needs to exist and be empty before creation of the IndexComponent. Note that usually you'd specify the location for the index files during installation of the SharePoint binaries, so you wouldn't need to specify it here. See New-SPEnterpriseSearchIndexComponent for details of the command if you need to use that parameter.

Note that the IndexPartition number is the same for both servers. This gives us a full copy of the index on each server to ensure that the entire index is present should one of the servers go off-line. If you use a different number for each server, the index would be split between the servers, but only part of the index would then be available if one of the servers were to go off-line.

Ensure that you have enough disk space for the indexes that will be generated; ideally the index files should be stored on a separate (fast) disk to the SharePoint installation/logs/etc.

Note that the crawler activity can be significant for large volumes of documents and/or large volumes of document 'churn'. Monitor things such as CPU, memory usage, disk queue depth to ensure the health of the servers and to ensure that they're not getting bogged down with the work they're performing. Running search components on the same servers that serve pages to end users can significantly affect the performance of the servers, and therefore the time that is required to render a page to the end users. You may need to provide additional resources for the servers to ensure required performance.

  • Thank you for providing clear information, I will work on this and update you. @Andy Dawson Commented Feb 3, 2017 at 4:33
  • This worked fine for me and also thank you for great explanation Commented Feb 15, 2017 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.