Change the default search topology in SharePoint Server 2013

Introduction

The procedures and the examples in this article assume that SharePoint Server 2013 and the Search service application are newly installed and that there is no content in the search index. This article explains how to create and activate search components in a new search topology coming from the default search topology.

If there are items in the search index, follow the procedures in Manage search components in SharePoint Server 2013 andManage the index component in SharePoint Server 2013.


Firstly:

 You should Create a Search service application in SharePoint Server 2013.

Second:

After creating a Search service application, the SharePoint Server Search service is started on the application server that is hosting the Central Administration website, and search components are deployed to that server, a default topology will be built automatically where all Search components are assigned to the server which is running the Central Administration, but  in multi servers farm scenario,  you need to change this topology , the only available way currently is through PowerShell which will provide more flexibility in configuring the topology, (you can NOT modify the topology through UI like you used to do with SharePoint 2010).

Here is my Sample Topology

I will guide you in this post on how to configure 5 servers as the following:

  • 3 front servers running the Query Processing component to handle search query requests from users, the query processing components will be located in the WFE servers.
  • 2 backend servers servers running the rest of Search components , The rest of search components will be located in the Application servers.
  • We will configure the below topology to have all Search components high available (no single point of failure for any components) , even the index partition will be replicated to the other server (replica)

Note: If there are items in the search index, do not continue with this procedure.

you can refer to the below diagram to have better understanding for the topology we are about to configure:

Before you start:

Make sure to run the below Powershell commands on the server that is hosting the Central Administrationfrom Central administration – Search Administration page , make sure the index files are empty , Searchable items appears as 0make sure that the current user who is going to execute the power shell is added as admin to Search service application.

SPAPP-SRV1, SPAPP-SRV2, SPWF-SRV1, SPWF-SRV2, SPWF-SRV3  are the server names

1. Specify the new servers you want to add search components to, start a search service instance (ssi) on these servers and create references to the search service instances. In this procedure we have used the example host names "myserver<n>" for the servers as listed in the Target search topology table. At the Windows PowerShell command prompt, type the following command(s):

$hostApp1 = Get-SPEnterpriseSearchServiceInstance -Identity "SPAPP-SRV1"  

$hostApp2 = Get-SPEnterpriseSearchServiceInstance -Identity "SPAPP-SRV2"

$hostWF1 = Get-SPEnterpriseSearchServiceInstance -Identity "SPWF-SRV1"

$hostWF2 = Get-SPEnterpriseSearchServiceInstance -Identity "SPWF-SRV2"

$hostWF3 = Get-SPEnterpriseSearchServiceInstance -Identity "SPWF-SRV3"

Start-SPEnterpriseSearchServiceInstance -Identity $hostApp1

Start-SPEnterpriseSearchServiceInstance -Identity $hostApp2

Start-SPEnterpriseSearchServiceInstance -Identity $hostWF1

Start-SPEnterpriseSearchServiceInstance -Identity $hostWF2

Start-SPEnterpriseSearchServiceInstance -Identity $hostWF3

2. Wait until all the search service instances are running. At the Windows PowerShell command prompt, type the following commands until the commands return the state "Online" for each of the search service instances:

Get Search Service Instance status (started or stopped) after running the above commands

Get-SPEnterpriseSearchServiceInstance -Identity $hostApp1 
Get-SPEnterpriseSearchServiceInstance -Identity $hostApp2 
Get-SPEnterpriseSearchServiceInstance -Identity $hostWF1 
Get-SPEnterpriseSearchServiceInstance -Identity $hostWF2 
Get-SPEnterpriseSearchServiceInstance -Identity $hostWF3 

3. Create a new search topology and a reference to the new search topology. At the Windows PowerShell command prompt, type the following command(s):

$ssa = Get-SPEnterpriseSearchServiceApplication

$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa

4. Add all the search components to the new search topology. The following Windows PowerShell commands will create the search components of the new topology and assign them to the new servers. In this small enterprise search topology there is one index partition, index partition 0, to cater for a maximum of ten million items. This is indicated with the parameter -IndexPartition in the command New-SPEnterpriseSearchIndexComponent. The index partition has one index replica on virtual machine B and one index replica on virtual machine D. Each index replica will contain the exact same search index and is hosted on a different physical server to achieve fault tolerance. At the Windows PowerShell command prompt, type the following command(s):

#SPAPP-SRV1

New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1

 

New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1

 

New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1

 

New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1

 

New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp1 -IndexPartition 0

 

#SPAPP-SRV2

New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2

 

New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2

 

New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2

 

New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2

 

New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology

-SearchServiceInstance $hostApp2 -IndexPartition 0

 

#SPWF-SRV1 , SPWF-SRV2 , SPWF-SRV3

New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostWF1

 

New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostWF2

 

New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology

-SearchServiceInstance $hostWF3

 

5. Activate the new search topology. At the Windows PowerShell command prompt, type the following command:

Set-SPEnterpriseSearchTopology -Identity $newTopology

 

6. Verify that the new search topology is active. At the Windows PowerShell command prompt, type the following command

 
Get-SPEnterpriseSearchTopology -SearchApplication $ssa

The command returns an overview of active and inactive topologies, in this example:

TopologyId     : fce8507d-61c6-4498-8038-4fd2d0a62c6e
CreationDate   : 1/30/2012 2:52:00 AM
State          : Inactive
ComponentCount : 6

TopologyId     : b63d48b2-df5c-41be-a7f4-9abaee483611
CreationDate   : 1/30/2012 4:30:00 AM
State          : Active
ComponentCount : 12

 

7. Verify that all components of the new search topology are running correctly. At the Windows PowerShell command prompt, type the following command

Get-SPEnterpriseSearchStatus -SearchApplication $ssa -Text

This command should return a list of all the active search components. The state of the active search components should be displayed as Active.

More tp link : Configuring SharePoint 2013 Search Topology andManage the search topology in SharePoint Server 2013.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章