Adding a New Search Partition and Replica in SharePoint 2013
I think there are probably resources out there somewhere for this by now, but I had a hard time finding them when I went looking for them previously so I thought I'd just post it here. Fortunately my friend Knut B. was good enough to shoot me some PowerShell a while back to help you manage your index partitions. In short - what you want to do is get a reference to the search service instance on the host where you want to create a partition or partition replica, then you're going to clone the existing search topology and add your partition or replica to it. Once you've done that, you can tell SharePoint to start using the clone of the topology that you created. Assuming you are starting with a farm that was created with the farm wizard, you will have one index partition, and that partition has no replicas. So let's look first at adding a new search partition:
# Specify the new server you want to add, and start the Search Service Instance:
$newssi = Get-SPEnterpriseSearchServiceInstance -Identity "nameOfServerThatYouWantTheNewPartitionOn"
Start-SPEnterpriseSearchServiceInstance -Identity $newssi
# Wait until the SSI is running. Run the following command until the SSI state indicates “Online”:
Get-SPEnterpriseSearchServiceInstance -Identity $newssi
Now that you've picked the server you want to work with and you know the search service instance is running on it, you can clone the existing search topology:
# Clone the existing topology:
$ssa = Get-SPEnterpriseSearchServiceApplication
$activeTopology=Get-SPEnterpriseSearchTopology -Active -SearchApplication $ssa
$newTopology = New-SPEnterpriseSearchTopology -SearchTopology $activeTopology -SearchApplication $ssa -Clone
Once you have your clone in hand, you can create a new partition. Partitions are just numbered 0 through whatever, so again, assuming you have used the wizard and just have one partition so far, then that partition number is 0. To add a second partition to our cloned topology we'll call it partition 1, then we'll set our cloned topology to be the new search topology.
# Add a new index component and specify it is associated with the new index partition 1:
New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $newssi -IndexPartition 1
Set-SPEnterpriseSearchTopology -Identity $newTopology
As you can see in the New-SPEnterpriseSearchIndexComponent, we pass along the $newssi variable, which is where we assigned the server on which we want to create the partition. Now once that partition is created, we run virtually the same exact PowerShell to create a replica of that partition on another server. Since I explained above what's going on, I'll just paste the entire PowerShell here and then comment on it:
# Specify the new server you want to add, and start the Search Service Instance:
$newssi = Get-SPEnterpriseSearchServiceInstance -Identity "nameOfServerThatYouWantTheReplicaOn"
Start-SPEnterpriseSearchServiceInstance -Identity $newssi
# Wait until the SSI is running. Run the following command until the SSI state indicates “Online”:
Get-SPEnterpriseSearchServiceInstance -Identity $newssi
# Clone the existing topology:
$ssa = Get-SPEnterpriseSearchServiceApplication
$activeTopology=Get-SPEnterpriseSearchTopology -Active -SearchApplication $ssa
$newTopology = New-SPEnterpriseSearchTopology -SearchTopology $activeTopology -SearchApplication $ssa -Clone
# Add a new index component and specify it is associated with the new index partition 1:
New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $newssi -IndexPartition 1
Set-SPEnterpriseSearchTopology -Identity $newTopology
The two things to note here are:
- In the Get-SPEnterpriseSearchServiceInstance cmdlet I indicate which server I want to host the partition replica
- In the New-SPEnterpriseSearchIndexComponent cmdlet I indicated the partition with the -IndexPartition flag. Since I already have an index partition 1, SharePoint will create a replica of that partition for me.
That's it - hope that gets you on your way to managing your search partitions in SharePoint 2013, and thanks again to Knut for sharing his PowerShell.
Comments
Anonymous
January 01, 2003
The comment has been removedAnonymous
March 11, 2013
Hi Steve, When we provision the search application the partiion 0 is created on the app Server. Now you have showed how to create a new partition. Can i move the partition 0 the default partition to another server?Anonymous
September 18, 2014
The comment has been removedAnonymous
January 12, 2015
m88 :http://m88en.com/new-online-casino-deposit-bonus-codes-2015/
M88.com offer online sports games Asia, Sports Betting Asia, Sports Betting Sites Asia.
m88asia : http://m88en.net/m88-bet-mansion88-online-casino-online/
Link to M88BET phone: m88en.com. – Register and Open Betting Account and Membership M88BET.
m88bet : http://www.linkm88vip.com/2014/12/m88-asia-main-home-register-online-free.html
MANSION88 the house is one of the largest and most prestigious. Appeared quite early in the Asian market, the so-MANSION88 currently attracts more players.
link m88 : http://m88wiki.com/google-chrome-bookmarks-fastest-m88-link/
Home the M88 is the official sponsor of the football club in the Premier League
Wish you happy with the new M88
m88 casino online : http://m88free.com/register-m88-football-betting/