Google+

Move search index location

Leave a comment

November 1, 2016 by Ruaan Harmzen

When you install SharePoint 2013 there is no option to change the default search index location (like the ULS log folder). If (like us) you keep your default c drive small and only allocated for installations it can cause some issues with size as the search index grows.

Unfortunately there is no config or easy way to change the location. In effect you need to copy\clone the search service application and use a new location and then delete the old one…all via Powershell:

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 “D:\SharePoint\SearchIndex”

 

Activate the cloned Search topology
Set-SPEnterpriseSearchTopology -Identity $clone
Remove the old Search topology
Remove-SPEnterpriseSearchTopology -Identity $current

 

Remove the old index component
$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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: