Monday, 7 August 2017

SharePoint 2013 Search - Add Index partition and Index replica

For each 10 million items in the search index, you have to add a new index partition. When you add a new index partition, the search index has to be re-partitioned. Depending on the size of the search index, this re-partitioning can take several hours to complete.

You add an index replica to the search topology to achieve fault tolerance for an existing index partition. You place the index replicas on separate failure domains on separate servers. When you add an index replica, you add a new index component to the search topology and associate it with the index partition that you want to make a replica of.

Step #1:Get Search Service Instance and start
$ssi3 = Get-SPEnterpriseSearchServiceInstance -Identity "CA1VMSPUATAPP03"
$ssi4 = Get-SPEnterpriseSearchServiceInstance -Identity "CA1VMSPUATAPP04"
Start-SPEnterpriseSearchServiceInstance -Identity $ssi3
Start-SPEnterpriseSearchServiceInstance -Identity $ssi4

Step #2:Wait for Search Service Instance to come online
Get-SPEnterpriseSearchServiceInstance -Identity $ssi

Step #3:clone the Active search topology
$ssa = Get-SPEnterpriseSearchServiceApplication
$active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
$clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone SearchTopology $active

Step #4: Create new index component
For example: If you have an existing index partition 0 with index replicas on App01 and App02 B, and you want to add a new index partition with index replicas on App03 and App04:

New-SPEnterpriseSearchIndexComponent SearchTopology $clone -SearchServiceInstance $ssi3 -IndexPartition 1 -RootDirectory "D:\SPIndex"
New-SPEnterpriseSearchIndexComponent SearchTopology $clone -SearchServiceInstance $ssi4 -IndexPartition 1 -RootDirectory "D:\SPIndex"

Step #5:Activate the cloned search topology
Set-SPEnterpriseSearchTopology -Identity $clone

Step #6:Verify that your new topology is active and that the index component representing the new index replica is added.
Get-SPEnterpriseSearchTopology -Active -SearchApplication $ssa

Step #7:Monitor the Distribution of the Index
Get-SPEnterpriseSearchStatus -SearchApplication $ssa -Text

Repeat this command until all search components, including the new index component, output the state Active. For a large search index, this could take several hours.

No comments:

Post a Comment