I’m Kiruthik Kumar(KK), and my blog is about all random things that I spend my time on !

Creating SharePoint Search Service Application & Search Topology (Part 4 of 5)

Create SharePoint Search Service Application Pool

We have to create a SharePoint search service application pool before creating a Search service application. PS Script to create the application pool is here.

#####variables
$searchServiceAppPoolName = "Dedicated SP2016 Search App Pool"
$searchServiceAppPoolAccount = "doco\spsearch"

#assuming that you are configuring only in the current server 
#(current servername ie., WINSP2016SRCH )
$servername = $env:computername 
 

##### Register the service account as Managed account
$appPoolCredential = Get-Credential  $searchServiceAppPoolAccount
New-SPManagedAccount  -Credential $appPoolCredential

##CREATE Search Service APP Pool
$searchServiceAppPool = New-SPServiceApplicationPool -Name $searchServiceAppPoolName -Account $searchServiceAppPoolAccount -Verbose

Create SharePoint Search Service Application

Then this app pool is used to create the service application, and the PS Script is here.

#####variables

$searchServiceAppPoolName = "Dedicated SP2016 Search App Pool"  ## Name of the App Pool that was created before
$searchServiceAppPool =  Get-SPServiceApplicationPool -Identity $searchServiceAppPoolName

$searchServiceName = "Dedicated SP2016 Search Service"
$searchServiceProxyName = "(Proxy)Dedicated SP2016 Search Service"
$databaseName = "Dedicated_SP2016_Search_DB"

 
#####Create Search Service Application
# here is when Search DBs are created. i.e, Search DB,CrawlStore & LinksStore
$searchServiceApp = New-SPEnterpriseSearchServiceApplication -Name $searchServiceName -ApplicationPool $searchServiceAppPool -DatabaseName $databaseName

Search Topology

As discussed, we will create a similar search topology. Either we can create the search topology through our powershell scripts or through the scripts generated using this tool, which is widely used and gives a nice UI for our understanding.

Either way, what happens is we will create new search components in the respective host search servers. Powershell script that I used is here.


 
##Get the Search SA
 $searchServiceApp = Get-SPEnterpriseSearchServiceApplication  -Identity "Dedicated SP2016 Search Service"
 $searchTopology = New-SPEnterpriseSearchTopology -SearchApplication $searchServiceApp 

 $host1 = Get-SPEnterpriseSearchServiceInstance -Identity "VMSrch01"
 $host2 = Get-SPEnterpriseSearchServiceInstance -Identity "VMSrch02"
 $host3 = Get-SPEnterpriseSearchServiceInstance -Identity "VMSrch03"
 $host4 = Get-SPEnterpriseSearchServiceInstance -Identity "VMSrch04"

## add components for Host1(VMSrch01)
 New-SPEnterpriseSearchAdminComponent -SearchTopology $searchTopology -SearchServiceInstance $host1  
 New-SPEnterpriseSearchCrawlComponent -SearchTopology $searchTopology -SearchServiceInstance $host1  
 New-SPEnterpriseSearchIndexComponent -SearchTopology $searchTopology -SearchServiceInstance $host1   -IndexPartition 0

## add components for Host2(VMSrch02)
 New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $searchTopology -SearchServiceInstance $host2
 New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $searchTopology -SearchServiceInstance $host2   
 New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $searchTopology -SearchServiceInstance $host2

## add components for Host3(VMSrch03)
 New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $searchTopology -SearchServiceInstance $host3
 New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $searchTopology -SearchServiceInstance $host3
 New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $searchTopology -SearchServiceInstance $host3   

## add components for Host4(VMSrch04)
 New-SPEnterpriseSearchIndexComponent -SearchTopology $searchTopology -SearchServiceInstance $host4 -IndexPartition 0
 New-SPEnterpriseSearchAdminComponent -SearchTopology $searchTopology -SearchServiceInstance $host4  
 New-SPEnterpriseSearchCrawlComponent -SearchTopology $searchTopology -SearchServiceInstance $host4  

#make this new search topology ACTIVE
 Set-SPEnterpriseSearchTopology -Identity $searchTopology 

Once the topology is made active, we can check the status to verify.

Check the active Search topology

And the same can be verified in the Central Admin Website where the Search Service application is present.

Check the Search topology in Central Admin

This blog post is part 4 of 5 on Dedicated SharePoint Search farm.

Comments