Move the search index location in SharePoint 2013

by Marco Rietveld 18. september 2013 14:09

During the installation of SharePoint 2013 there is an option to change the search index location. The default location is C:\Program Files\Microsoft Office Servers\15.0\Data. It is possible to change the search index location to a dedicated volume after the installation using PowerShell.

Managing the search topology in SharePoint 2013 can be done only via PowerShell. Here is an article about the procedure:

Changing the search index location can be done by following the next steps:

  • Get the current search topology
  • Clone the current search topology
  • Modify the cloned Search topology
    (add a new index component with new search index location)
  • Activate the cloned search topology
  • Remove the old search topology
  • remove old index component
    (This means clone, modify, activate search topology and remove the old search topology)

Get the current Search topology

$ssa = Get-SPEnterpriseSearchServiceApplication "Search Service Application"
$instance=Get-SPEnterpriseSearchServiceInstance -Local
$current=Get-SPEnterpriseSearchTopology -SearchApplication $ssa


Clone the current Search topology

$clone=New-SPEnterpriseSearchTopology -Clone -SearchApplication $ssa -SearchTopology $current


Modify the cloned Search topology

This will add a second index component with a new index location.

New-SPEnterpriseSearchIndexComponent -SearchTopology $clone -IndexPartition 0 -SearchServiceInstance $instance -RootDirectory "E:\NewIndexLocation"


Activate the cloned Search topology

Set-SPEnterpriseSearchTopology -Identity $clone


Remove the old Search topology

Remove-SPEnterpriseSearchTopology -Identity $current

The next step, remove the old index component, should be done when the new index component is ready.
This can be checked from Central Admin on the Search Administration page, view the status of the search topology or use PowerShell Get-SPEnterpriseSearchStatus. The new index component must be Active.


Remove the old index component

This must be done by get, clone, modify, activate the new search topology and remove the old search topology

$current=Get-SPEnterpriseSearchTopology -SearchApplication $ssa
$clone=New-SPEnterpriseSearchTopology -Clone -SearchApplication $ssa -SearchTopology $current
$comp=Get-SPEnterpriseSearchComponent -SearchTopology $clone | ? {$_.Name -eq "IndexComponent1"}
Remove-SPEnterpriseSearchComponent -Identity $comp -SearchTopology $clone
Set-SPEnterpriseSearchTopology -Identity $clone
Remove-SPEnterpriseSearchTopology -Identity $current

Tags: | |

Pingbacks and trackbacks (1)+

Reactie plaatsen

  • Reactie
  • Live voorbeeld

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2022 SharePoint Geek