​​

Managing Search Administration in SharePoint 2013​

By Ryan Holderread, SharePoint Engineer


The first thing you’ve probably noticed when you launch search administration in SharePoint 2013 is that there is no way to manage the search topology from central administration:


SharePoint 2013 Search Admin

So any changes that need to be made to the topology will need to be done through the SharePoint 2013 Management Shell.

To modify the search topology, the first thing you will need to do is bind to your search service application, get the active search topology and then clone it.

$ssa = Get-SPEnterpriseSearchServiceApplication

$active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa –Active

$clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone –SearchTopology $active


Once you have cloned the search topology, you are able to modify it by binding to the cloned instance. For example, if you add a new server to your farm and you want to move all search components to it:


New-SPEnterpriseSearch<SearchComponent> -SearchTopology $clone -SearchServiceInstance <computer name>


Where New-SPEnterpriseSearch<SearchComponent> is the component you want to move:


New-SPEnterpriseSearchAdminComponent
New-SPEnterpriseSearchAnalyticsProcessingComponent
New-SPEnterpriseSearchContentProcessingComponent
New-SPEnterpriseSearchCrawlComponent
New-SPEnterpriseSearchQueryProcessingComponent
New-SPEnterpriseSearchIndexComponent -IndexPartition <Index partition number> ** optional -RootDirectory D:\Index to move the index to an addtional drive **

After you've added your new search components, you will need to remove the 'old' components.  You can get the modified ('cloned') search topology by using the following cmdlet:

Get-SPEnterpriseSearchComponent -SearchTopology $clone

In this example, I've added a new crawl component to RH-SP2013WFE and I'm wanting to move it off RH-SP2013APP:


SharePoint 2013 Search Admin 

In order to do this I’ll need to use the Remove-SPEnterpriseSearchComponent cmdlet.  In this case:

SharePoint 2013 Search Admin Tutorial Pic 3 

Remove-SPEnterpriseSearchComponent -Identity 2cb67699-6bd9-4a4f-a912-2f6dfa59c0c2 -SearchTopology $clone

You can remove as many of the components as you like at one time, with the exception of the admin component as it has to be online in order to process the other requests.  So you if you are wanting to move that component, you would again clone the search topology move that individual component, and then activate the topology and move the remaining components.


Once you’ve made your changes and are ready to commit them, you can now set the cloned topology as the active topology:

Set-SPEnterpriseSearchTopology -Identity $clone

SharePoint 2013 Search Admin

Watch out for ports here!  TCP 808 (besides other obvious SharePoint ports) needs to be allowed inbound if there are any sort of ACLs in place between the two search servers!

REF: http://technet.microsoft.com/en-us/library/jj862354.aspx#Search_Comp_Clone

"Okay, great but what about recreating a search service application or building a new one?" -You

I've included a script that will prompt you through the creation of the search service application in SharePoint 2013


I created the script due to the fact that at Rackspace we have to modify search topologies on a semi frequent basis for customer farms.  It is still a work in progress but works for most scenarios where you're recreating a search service application. 

Enjoy!

Click here to download script.

**note that in this script, it's LOOKING for two application pools so if they do not exist, the script will stop!  This will need to be modified to suit your build**


 


Powered by SharePoint 2013 © 2016 Rackspace, US Inc.