
Hi anonymous user ,
You needn't reset the search index. But before we can start modifying the search topology, we need to ensure that the Search Index is empty and that no crawls are currently running or scheduled to run during our modifications.
Please following step:
Step 1: Check Index File Location
Run the below PowerShell script as an admin:
ADD-PSSNAPIN MICROSOFT.SHAREPOINT.POWERSHELL
$SSI = GET-SPENTERPRISESEARCHSERVICEINSTANCE
$SSI.COMPONENTS
Step 2: Ensure Search Index is Empty and No Crawls are Running
- Browse to SharePoint Central Administration >> Application Management >> Manage Service Applications >> Search Service Application
- From the Search Service Application: Search Administration page, ensure that the Searchable Items shows “0”
- Next, while still on the Search Administration page, select Content Sources from the Crawling section in the quick launch area.
- On the Manage Content Sources page, verify that the status shows “Idle” and no crawls are scheduled to run in the near future.
Step 3: Modify Search Topology
In my test, I have two Web Front End Servers and two Application servers. I will choose to run the Search components on both Application Servers. If you have more than two servers, the below script can be modified to add additional hosts.
$HOSTA = GET-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY "SERVER1"
$HOSTB = GET-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY "SERVER2"
START-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY $HOSTA
START-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY $HOSTB
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-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY $HOSTA
GET-SPENTERPRISESEARCHSERVICEINSTANCE -IDENTITY $HOSTB
You will now need to create an entirely new Search Topology. Using PowerShell ISE, type and run the following commands:
$SSA = GET-SPENTERPRISESEARCHSERVICEAPPLICATION
$NEWTOPOLOGY = NEW-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA
Now it is time to choose which search components you want to run on what servers. In this example, as I only have two application servers, I am going to split each component and have each server run all components. As you can see in the following commands, each server will host the same six components.
NEW-SPENTERPRISESEARCHADMINCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTA
NEW-SPENTERPRISESEARCHCRAWLCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTA
NEW-SPENTERPRISESEARCHCONTENTPROCESSINGCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTA
NEW-SPENTERPRISESEARCHANALYTICSPROCESSINGCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTA
NEW-SPENTERPRISESEARCHQUERYPROCESSINGCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTA
NEW-SPENTERPRISESEARCHINDEXCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTA -INDEXPARTITION 0
NEW-SPENTERPRISESEARCHADMINCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTB
NEW-SPENTERPRISESEARCHCRAWLCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTB
NEW-SPENTERPRISESEARCHCONTENTPROCESSINGCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTB
NEW-SPENTERPRISESEARCHANALYTICSPROCESSINGCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTB
NEW-SPENTERPRISESEARCHQUERYPROCESSINGCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTB
NEW-SPENTERPRISESEARCHINDEXCOMPONENT -SEARCHTOPOLOGY $NEWTOPOLOGY -SEARCHSERVICEINSTANCE $HOSTB -INDEXPARTITION 0
Now activate the new search topology. Run the following command to active the topology. (PS: This command could take a few minutes to run)
SET-SPENTERPRISESEARCHTOPOLOGY -IDENTITY $NEWTOPOLOGY
Verify that the new search topology is active:
GET-SPENTERPRISESEARCHTOPOLOGY -SEARCHAPPLICATION $SSA
The following command can be used to verify each component of the search topology.
- GET-SPENTERPRISESEARCHSTATUS -SEARCHAPPLICATION $SSA -TEXT
Reference:
Thanks,
Echo Du
======================================
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.