Tuesday 9 December 2014

SharePoint Search Components and Search Topology


The search-component of SharePoint 2010 is one of the central ones and needs individual adaption after installation. When not individualizing the search, all components of the “search topology” will be installed on one server. Microsoft recommends distributing these components across servers to guarantee a load sharing and reliability.
With small to medium SharePoint farms the following servers are frequently existent.


 SharePoint Search – Server Infrastructure Overview

SharePoint Search - Server Infrastructure Overview
The graphic shows a typical server infrastructure for SharePoint 2010.

The Sharepoint search elements

Generally the search can be divided into three parts: Crawl, index and query.
Crawl prepares the results by reading data contents and writes them (e.g. root word detection) into the index database. When a user uses the search function, the result is produced by the query-component with help of the index and the search databases. For that the query server is the interface of a search request to the index. Here, the requests are prepared and it is checked for example if the user at least has read-authorization on the document.

Distribution of the Sharepoint search components

The components of the search should “ideally” be distributed on the servers as follows:
The most important SharePoint search component crawl is to be installed on the “App”-server. This is a mandatory requirement to be able to create the index. Because crawl generates a high CPU load, the “App” server should be equipped with respective CPUs. Should crawl take too much time or generate a load to high on the “App” server, an additional server should be integrated into the farm. The load will then automatically be divided by the crawl components and prevent one file from being processed simultaneously by more than one component.
Adding a crawling component
The administration-component is provided on the “App” server as well. It can only be provided on one server per “Search Service Application”.
The index is set up by the crawl component. It is recommended to distribute the index including the query component on at least two servers to reduce the index’ size and guarantee its reliability.
WFE1 = Index Partition 0 – Query Component | Index Partition 1 – Query Component (“Mirror”)
WFE2 = Index Partition 1 – Query Component | Index Partition 0 – Query Component (“Mirror”)
How to: Add an Index Partition
How to: Add a Query component
Search Topology and Sharepoint search components
For the query topology I created the following PowerShell script in a current project.

Add-PSSnapin Microsoft.SharePoint.PowerShell -ea SilentlyContinue

$searchSA  = "SearchService" 
$searchPropertyDBName = "SearchService_PropertyStoreDB" 
$searchPropertyDBServer = "SQLSERVER.DOMAIN.COM" 
$indexLocation = "C:\Program Files\Microsoft Office Servers\14.0\Data\Office Server\Applications"
$queryServer1 =  Get-SPEnterpriseSearchServiceInstance "WFE1" 
$queryServer2 =  Get-SPEnterpriseSearchServiceInstance "WFE2" 

$queryTopology = New-SPEnterpriseSearchQueryTopology -SearchApplication $searchSA -Partitions 2
$propertyDatabase = New-SPEnterpriseSearchPropertyDatabase -SearchApplication $searchSA -DatabaseName $searchPropertyDBName -DatabaseServer $searchPropertyDBServer $indexPartitions = Get-SPEnterpriseSearchIndexPartition -QueryTopology $queryTopology 

$indexPartition1 = $indexPartitions[0] 
$indexPartition1 | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $propertyDatabase
$indexPartition2 = $indexPartitions[1] 
$indexPartition2 | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $propertyDatabase

Get-SPEnterpriseSearchQueryComponent  -QueryTopology $queryTopology 
$queryComponent1 = New-SPEnterpriseSearchQuerycomponent -QueryTopology $queryTopology -IndexPartition $indexPartition1 -SearchServiceInstance $queryServer1 
$queryComponent2 = New-SPEnterpriseSearchQuerycomponent -QueryTopology $queryTopology -IndexPartition $indexPartition2 -SearchServiceInstance $queryServer2

$mirrorQueryComponent1 = New-SPEnterpriseSearchQuerycomponent -QueryTopology $queryTopology -IndexPartition $indexPartition2 -SearchServiceInstance $queryServer1 
$mirrorqueryComponent2 = New-SPEnterpriseSearchQuerycomponent -QueryTopology $queryTopology -IndexPartition $indexPartition1 -SearchServiceInstance $queryServer2

$queryTopology | Set-SPEnterpriseSearchQueryTopology -Active


Reference:

http://activedirectoryfaq.com/2014/09/sharepoint-search-components-and-search-topology/
 

No comments:

Post a Comment