Skip to main content

Move SharePoint 2013 Search Component to another server


For different reasons, there are times an admin will like to move  SharePoint Search component around.

The different component in the Search Service can be allocated to different application servers if you have more than one.  This will help to balance the use of resources on those system. This is applicable if you already have a healthy working search topology.

To start with, run the following command get your Search service application instantiated

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

$clone=New-SPEnterpriseSearchTopology -Clone -SearchApplication $ssa -Se
archTopology $current

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

Then go ahead and clone the existing topology 

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

Then instantiate the new server (destination)
$NewServer = Get-SPEnterpriseSearchServiceInstance -Identity serverName
Start-SPEnterpriseSearchServiceInstance -Identity $NewServer

You can then type 
Get-SPEnterpriseSearchServiceInstance -Identity $NewServer

to get the details of the new server

TypeName    : SharePoint Server Search
Description : Index content and serve search queries
Id          : aa423eaf-2701-435f-9a7b-86a3cc76f492
Server      : SPServer Name=xxxxxxxxxx
Service     : SearchService Name=OSearch15
Role        : None
Status      : Provisioning

Wait for the status to change to Online...


Get-SPEnterpriseSearchServiceInstance -Identity $NewServer


TypeName    : SharePoint Server Search
Description : Index content and serve search queries
Id          : aa423eaf-2701-435f-9a7b-86a3cc76f492
Server      : SPServer Name=SW44GFCPSPA02
Service     : SearchService Name=OSearch15
Role        : None
Status      : Online


Then create a new clone... 
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $clone -S
earchServiceInstance $NewServer


ComponentId : 0cf68d0f-6faa-4587-b4d4-0b29e87e49c3
TopologyId  : 8a1d4f33-bc37-4677-909a-2ddd5cfd7ff7
ServerId    : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name        : QueryProcessingComponent2
ServerName  : xxxxxxxxxxx



New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $clon
e -SearchServiceInstance $NewServer


NumProcessingTasksInParallel : 4
MaxSortMemoryInMB            : 40
ComponentId                  : 1231bd2c-d41b-4e47-9ef2-69330ee2fdb9
TopologyId                   : 8a1d4f33-bc37-4677-909a-2ddd5cfd7ff7
ServerId                     : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name                         : AnalyticsProcessingComponent2
ServerName                   : xxxxxxxxxxxxxxx



New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $clone
-SearchServiceInstance $NewServer


ComponentId : 14af5bbf-510d-4e90-80bd-ead4c2691f11
TopologyId  : 8a1d4f33-bc37-4677-909a-2ddd5cfd7ff7
ServerId    : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name        : ContentProcessingComponent2
ServerName  : xxxxxxxxxx



New-SPEnterpriseSearchIndexComponent -SearchTopology $clone -IndexPartit
ion 0 -SearchServiceInstance $NewServer -RootDirectory G:\SearchIndex


IndexPartitionOrdinal : 0
RootDirectory         : G:\SearchIndex
ComponentId           : 16fdcf14-6b91-453b-945e-3c1d1a60da2c
TopologyId            : 8a1d4f33-bc37-4677-909a-2ddd5cfd7ff7
ServerId              : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name                  : IndexComponent2
ServerName            : xxxxxxxxxx



Set-SPEnterpriseSearchTopology -Identity $clone
New-SPEnterpriseSearchCrawlComponent -SearchTopology $clone -SearchServi
ceInstance $NewServer
New-SPEnterpriseSearchCrawlComponent : Cannot make changes to topology in :
Active state
At line:1 char:1
+ New-SPEnterpriseSearchCrawlComponent -SearchTopology $clone
-SearchServiceInstan ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : InvalidData: (Microsoft.Offic...hCrawlComponent:
   NewSearchCrawlComponent) [New-SPEnterpriseSearchCrawlComponent], InvalidTo
  pologyException
    + FullyQualifiedErrorId : Microsoft.Office.Server.Search.Cmdlet.NewSearchC
   rawlComponent

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

$clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -
SearchTopology $active
Get-SPEnterpriseSearchComponent -SearchTopology $clone


ComponentId : 9d9c00c2-5a12-4745-99ff-c9d9c1cd3bab
TopologyId  : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId    : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name        : QueryProcessingComponent2
ServerName  : xxxxxxxxxxxxxxx

IndexPartitionOrdinal : 0
RootDirectory         :
ComponentId           : 45878228-c344-4f9f-91e7-e4007f98e194
TopologyId            : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId              : 9e6002af-412c-4454-b761-3f01474d32be
Name                  : IndexComponent1
ServerName            : xxxxxxxxxxxx

ComponentId : fd7b9f08-8c98-40db-8a89-f25c46f04e12
TopologyId  : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId    : 9e6002af-412c-4454-b761-3f01474d32be
Name        : AdminComponent1
ServerName  : xxxxxxxxxxxxxx

ComponentId : d54f2ba7-d068-460d-ae8b-834c5f4d04c5
TopologyId  : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId    : 9e6002af-412c-4454-b761-3f01474d32be
Name        : ContentProcessingComponent1
ServerName  : xxxxxxxxxxxxxxxxxxx

IndexPartitionOrdinal : 0
RootDirectory         : G:\SearchIndex
ComponentId           : 1a049aa2-e1db-4c28-94c1-48ca75c2d696
TopologyId            : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId              : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name                  : IndexComponent2
ServerName            : xxxxxxxxxxxxxxxx

ComponentId : 7681227d-ae1c-40fd-a038-9da726a7964c
TopologyId  : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId    : 9e6002af-412c-4454-b761-3f01474d32be
Name        : CrawlComponent0
ServerName  : xxxxxxxxxxxxxxxxx

NumProcessingTasksInParallel : 4
MaxSortMemoryInMB            : 40
ComponentId                  : e0e3225f-094d-4254-b0d1-af4bfeb51020
TopologyId                   : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId                     : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name                         : AnalyticsProcessingComponent2
ServerName                   : xxxxxxxxxxxxxxxxxxx

ComponentId : a57f27ec-312c-4112-b83d-821e7efd1954
TopologyId  : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId    : 9e6002af-412c-4454-b761-3f01474d32be
Name        : QueryProcessingComponent1
ServerName  : xxxxxxxxxxxxxxxxx

NumProcessingTasksInParallel : 4
MaxSortMemoryInMB            : 40
ComponentId                  : 5779ac5c-a1b0-4680-96f6-fd9f796e678f
TopologyId                   : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId                     : 9e6002af-412c-4454-b761-3f01474d32be
Name                         : AnalyticsProcessingComponent1
ServerName                   : xxxxxxxxxxxxxxxxxxxx

ComponentId : 4aed084c-9bd6-4e29-9c8e-a80d150c1819
TopologyId  : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId    : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name        : ContentProcessingComponent2
ServerName  : xxxxxxxxxxxxxxxxxxxxxxxx

You can proceed to remove the component from the old box

Remove-SPEnterpriseSearchComponent -Identity IndexComponent1 -SearchTopo
logy $clone -confirm:$false
Remove-SPEnterpriseSearchComponent -Identity QueryProcessingComponent1 -
SearchTopology $clone -confirm:$false
Remove-SPEnterpriseSearchComponent -Identity AnalyticsProcessingComponen
t1 -SearchTopology $clone -confirm:$false
Remove-SPEnterpriseSearchComponent -Identity ContentProcessingComponent1
 -SearchTopology $clone -confirm:$false
New-SPEnterpriseSearchCrawlComponent -SearchTopology $clone -SearchServi
ceInstance $NewServer


ComponentId : 180af716-63b6-4748-a425-4ec2bd8500ce
TopologyId  : c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId    : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name        : CrawlComponent1
ServerName  : xxxxxxxxxxxxxxx



PS G:\> Set-SPEnterpriseSearchTopology -Identity $clone
PS G:\> $ssa = Get-SPEnterpriseSearchServiceApplication
PS G:\> $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active

PS G:\> $clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -
SearchTopology $active
PS G:\> Get-SPEnterpriseSearchComponent -SearchTopology $clone


IndexPartitionOrdinal : 0
RootDirectory         : G:\SearchIndex
ComponentId           : faf2f037-ff6d-463e-a883-012ba4af3cdf
TopologyId            : 4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId              : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name                  : IndexComponent2
ServerName            : xxxxxxxxxxxxxxxxxxx

ComponentId : 74abdb41-a703-4ca1-8386-46fcac8e181f
TopologyId  : 4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId    : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name        : CrawlComponent1
ServerName  : xxxxxxxxxxxxxxxxxxxx

ComponentId : 1faec968-e84f-4f83-b818-f68b778ebcff
TopologyId  : 4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId    : 9e6002af-412c-4454-b761-3f01474d32be
Name        : CrawlComponent0
ServerName  : xxxxxxxxxxxxxxxxxxxxxx

ComponentId : 6e94c873-e1df-4210-832e-8c6e5a5da09d
TopologyId  : 4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId    : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name        : ContentProcessingComponent2
ServerName  : xxxxxxxxxxxxxxxxxxxx

NumProcessingTasksInParallel : 4
MaxSortMemoryInMB            : 40
ComponentId                  : 6ec2864b-9408-4dea-a4a8-f953fbac0fc4
TopologyId                   : 4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId                     : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name                         : AnalyticsProcessingComponent2
ServerName                   : xxxxxxxxxxxxxxxxxxxxxx

ComponentId : fd8986af-fc20-4063-bf54-dd4431cb6227
TopologyId  : 4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId    : dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name        : QueryProcessingComponent2
ServerName  : xxxxxxxxxxxxxxxxxxx

ComponentId : 5e36f57a-80eb-4e20-9c08-25b6a6305bac
TopologyId  : 4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId    : 9e6002af-412c-4454-b761-3f01474d32be
Name        : AdminComponent1
ServerName  : xxxxxxxxxxxxxxxxxx


You can now remove component from the old server
Remove-SPEnterpriseSearchComponent -Identity CrawlComponent0 -SearchTopo
logy $clone -confirm:$false
 Set-SPEnterpriseSearchTopology -Identity $clone

Comments

Popular posts from this blog

Event Date Function

  Date.toISOFormat = function (date, ignoreTime) {      /// <summary>Date object static method to format a date to date ISO string - YYYY-MM-DDThh:mm:ssZ</summary>      /// <param name="date" type="Date" mayBeNull="false" optional="false"></param>      /// <param name="ignoreTime" type="Boolean" mayBeNull="false" optional="true"></param>      /// <returns type="String">A string representing ISO format for specied date</returns>        // If not specified, time is ignored      var ignoreTime = ignoreTime || {};        function pad(number) {          // Add leading 0 if number is less then 10 (enclosed method)          var r = String(number);          if (r.length ==...

The _spPageContextInfo

I f you are creating a SharePoint app using JavaScript and the Client side object model you need this friendly object. In the development of an app, you would require some basic properties- SharePoint as a framework provides these with the  _spPageContextInfo  object. _  spPageContextInfo  will provide these below properties:  webServerRelativeUrl  webAbsoluteUrl siteAbsoluteUrl serverRequestPath layoutsUrl webTitle webTemplate tenantAppVersion isAppWeb webLogoUrl webLanguage currentLanguage currentUICultureName currentCultureName env nid fid clientServerTimeDelta updateFormDigestPageLoaded siteClientTag crossDomainPhotosEnabled webUIVersion webPermMasks pagePersonalizationScope userId userLoginName systemUserKey alertsEnabled siteServerRelativeUrl allowSilverlightPrompt themedCssFolderUrl themedImageFileNames

PublishingAssociatedContentType

The Content Type to be associated with a page layout is indicated by the 'PublishingAssociatedContentType'. In the actual sense it means a binding setting between the Page Layout and the content type. If you fail to provide one, the SharePoint framework will make use of the Page Content type. The format of the binding is: ';# e.g. ';#ContentPage;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900470b13dd348649d08f9e5151501df9a4000dbd46dad8d045f98c83ad983b66d3f2;#'. where Content Type name: ContentPage Content Type ID: 0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900470b13dd348649d08f9e5151501df9a4000dbd46dad8d045f98c83ad983b66d3f2 respectively. QED