I have a SP2016 farm with 2 index servers. Since I have a lot of data on the farm, I wanted to remove the index from the C: Drive to another drive with more space.
I went ahead an followed this article. https://www.totalsol.com/how-to-move-a-sharepoint-search-index/
Using the following commands
$ssa = Get-SPEnterpriseSearchServiceApplication “Search Service Application”
$instance=Get-SPEnterpriseSearchServiceInstance -Local
$current=Get-SPEnterpriseSearchTopology -SearchApplication $ssa
$clone=New-SPEnterpriseSearchTopology -Clone -SearchApplication $ssa SearchTopology $current
New-SPEnterpriseSearchIndexComponent -SearchTopology $clone -IndexPartition 0 -SearchServiceInstance $instance -RootDirectory “E:\NewIndexLocation”
Set-SPEnterpriseSearchTopology -Identity $clone
Remove-SPEnterpriseSearchTopology -Identity $current
I got a new index, but somehow the old index was not removed.
In my search application it currently looks like this.
I have tried to use the following
$comp=Get-SPEnterpriseSearchComponent -SearchTopology $clone | ? {$_.Name -eq “IndexComponent1”}
Remove-SPEnterpriseSearchComponent -Identity $comp -SearchTopology $clone
But without any luck. How do I remove the index the duplicated index ?