Monday 5 September 2016

Fix a degraded SharePoint 2013 index partition

#set Search Service Application
$ssa = Get-SPEnterpriseSearchServiceApplication

#recreate search topology with new index component
#reset the index if the bad component is the index

#grab component name of faulty topology component and it's respective server name
Get-SPEnterpriseSearchStatus -SearchApplication $ssa -Text

#put server name where [SERVER] is.. remove the []
$hosta = get-spenterprisesearchserviceinstance -identity [SERVER]

#get the existing topology
$active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active

#copy the existing topology
$clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -SearchTopology $active

#remove the bad component, placing the name where [BAD COMPONENT NAME] is... remove the []
$ComponentID = (Get-SPEnterpriseSearchComponent -SearchTopology $clone -Identity [BAD COMPONENT NAME]).componentID
Remove-SPEnterpriseSearchComponent -Identity $ComponentID.GUID -SearchTopology $clone -confirm:$false

#create the new component, the example below is for the index specifically - create a new folder for the index so it's empty!
New-SPEnterpriseSearchIndexComponent -SearchTopology $clone -SearchServiceInstance $hostA -IndexPartition 0 -RootDirectory F:\SPIndex

#Set this copy as the active topology
Set-SPEnterpriseSearchTopology -identity $clone

2 comments:

  1. Shouldn't you give credit to the person that originally posted this solution?

    https://sharepoint.stackexchange.com/questions/88697/how-do-i-fix-a-degraded-sharepoint-2013-index-partition-when-there-is-only-one-o

    Look at the first of the answers that were posted in 2014

    ReplyDelete
  2. Hi Mardis,
    Yes. Agreed.
    I have created my blog to manage the good content which i have referred in the internet for my reference.
    Actually when i created the post, i used to give the original post reference link. Some of the posts i forgotten. If you checked my some other posts, i can find the original links where i have taken. Some blogs i have created with my own content.
    I hope you understand..

    ReplyDelete