Wednesday, May 13, 2015

Search Index Location - SharePoint 2013

With this post I'll try to explain the complete step-by-step guide how to check and change Search Index Location in SharePoint 2013. Unfortunately in internet I found different posts but non of them was complete

For one of our customers we have to check Search Index Location and I found this post , great I'll find very easy the location. BUT I was surprised when I got the result in Power Shell:

  • $ssa = Get-SPServiceApplication –Name "Search Service Application"
  • $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
  • Get-SPEnterpriseSearchComponent -SearchTopology $active | ?{$_.Name -like "*index*"}

Root directory is empty in my case, in the aforementioned post I could not find what actually this means.

Another post stated that with only 2 Power Shell commands I'll get the necessary for me information. The result after execution was:

OK looks like the location is the default search index location and I've to change it.
Found one very useful Power Shell script which I highly recommend to use in case you would like to change index location. The only thing you have to change at the bottom of the script are:
  • SearchServiceName
  • Server (name)
  • Index Location (suggestion use non system drive)
Execution on my servers finished with success.

Then I would like to check index location again and executed again:
  • $ssi = Get-SPEnterpriseSearchServiceInstance
  • $ssi.Components
And SURPRISE the Index Location was the same ... C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server\Applications ... I can't believe it.

Then I executed the first 3 cmdlets and  now the result is a bit different:

Actually the changes are here :-)


If you would like to check your Search Index Location in SharePoint 2013 you need the following power shell commands:
  1.  $ssa = Get-SPServiceApplication –Name "Search Service Application"
  2.  $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
  3.  Get-SPEnterpriseSearchComponent -SearchTopology $active | ?{$_.Name -like "*index*"} 
In case RootDirectory is empty that means your search index location is the default location - C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server\Applications, if it shows something different like D:\SearchIndex this is you index location

I hope you will find this post usefull!

Please share!

No comments:

Post a Comment