SharePoint - Custom Search Topology

/ Andreas Glaser

See how to create a SharePoint small, medium and large search farm using a custom search topology.


Applies to:

  • SharePoint Server Server Subscription Edition 24H1
  • SharePoint 2019
  • SharePoint 2016

Install SharePoint Server Subscription Edition - The Complete E-Book:

Scenario

Please note:

  • You need a little bit of experience with SharePoint and how to set up a default search topology.
  • Your search index must be empty for this example to work. Otherwise have a look at the links below.

I'm going to configure a SharePoint small search farm:

SharePoint  small search farm

You can easily apply the steps below to your own requirements and create any kind of SharePoint search topology including medium and large search farms.


If your SharePoint search index is not empty please use the following resources to manage the search topology:


Back to top

Planning

Please plan your search architecture using the following comprehensive resources by Microsoft:

The second resource shows you which search architecture you need for your content and the required hardware.


The small search farm in this scenario can:

  • Crawl 50 documents per second
  • Serve 10 search queries per second

The small search farm is suitable up to 20 million documents and a full crawl takes 110 hours.

Back to top

Before You Begin

Please make sure that [1]:

  1. SharePoint Server is installed on all the servers that you want to host search components on

  2. The servers have been added to the SharePoint farm

  3. You are an administrator on all these servers

  4. The search index is empty (if you already created the default search topology):
    Make sure the SharePoint  search index is empty

    Open Central Administration and go to "Application Management > Manage Service Applications" and select the Search Service Application. Under "System Status" verify that "Searchable items" displays "0".

  5. Ensure that no crawls have been started (if you already created the default search topology):
    Ensure that no SharePoint  crawls have been started

    Open Central Administration and go to "Application Management > Manage Service Applications" and select the Search Service Application. Click "Content Sources":

If you are unsure about specific SharePoint requirements please find more information here:


If you didn't successfully install SharePoint please do this first:


Also please make sure sure you have the newest SharePoint Cumulative Updates installed:


Back to top

Search Components

This scenario is based on a small search farm [2].

The search components are distributed accross servers the following way:

SharePoint  search component distribution for a small search farm

There are 4 servers:

  • The first two servers are responsible for answering user queries. They also host a replica of the index. (SP-2019-Q-A, SP2019-Q-B)

  • The last two servers are responsible for crawling and processing content. They also host the search analytics and usage analytics component as well as the search administration component. (SP-2019-C-A, SP-2019-C-B)

Back to top

Default Search Topology

Microsoft suggests creating the default search topology first [3].

All search components are running on one server:

SharePoint  default search topology

If you have issues you only need to analyze a simple search topology on one server instead of a topology distributed across several servers.

Back to top

Custom Search Topology

If you want to change your search topology you need to use PowerShell.

The PowerShell script Search Service Application_Custom Topology.ps1 includes all necessary steps [3]:

  1. Start a search service instance on all the servers that you want to host search components on.
  2. Create a new empty search topology.
  3. Add search components to the new search topology.
  4. Activate the new search topology.
  5. Verify that the new search topology is active.

First open "Start > Windows Administrative Tools > Services" on all the servers that you want to host search components on. Verify that the service "SharePoint Search Host Controller" is running:

Verify that the service SharePoint Search Host Controller is running


Edit the script "Search Service Application_Custom Topology.ps1".
In line 2 enter all the servers that you want to host search components on:

Enter all the servers that you want to host search components on

In my example scenario those servers are:

  1. SP-Search-C-A: Crawl, Admin, Analytics and Content processing 1
  2. SP-Search-Q-A: Query Processing 1 and Index

  3. SP-Search-C-B: Crawl, Admin, Analytics and Content processing 2
  4. SP-Search-Q-B: Query Processing 2 and Index

Note: The order is important.


The next part of the script (lines 52-66) allows you to freely create any search component on any SharePoint server you want:

Freely create any search component on any SharePoint server you want

The left side shows you the component to create, e.g. "New-SPEnterpriseSearachAdminComponent".

The right side shows the server you want to deploy the component to:

  1. $SearchServers[0] equals "SP-Search-C-A"
  2. $SearchServers[1] equals "SP-Search-Q-A"
  3. $SearchServers[2] equals "SP-Search-C-B"
  4. $SearchServers[3] equals "SP-Search-Q-B"

By moving search components to any SharePoint server, you can easily create small, medium and large search farms.

Note: If you want to create a small search farm you don’t have to edit this part of the script. You just need to edit the list of servers in the previous step.


Log in to a SharePoint server using the Farm Administrator account

Open the "SharePoint Management Shell" as an administrator and run the script:

Open the SharePoint  Management Shell as an administrator and run the script

Running the script will take time and depending on your hardware capabilities it can take up to 10 minutes.


Once the script has finished, you’ll see the updated search topology.

Verify that the new search topology is active:

Verify that the new search topology is active


SharePoint  small search farm

(See: Central Administration > Application Management > Manage Service Applications > Search Service Application)


Back to top

Install SharePoint Server Subscription Edition - The Complete E-Book:

4aaca30c9ec1dba50743b882821044e245ffa9a16d4bf8a8d13702366ae13033