After the search service is created, you can go to the management center and Application Management page to enter the management page of the search service. after entering the management page, you can see the search topology of the current SharePoint farm.
If there are multiple servers in the SharePoint field, you need to deploy the Search Component on these servers. You can start the SharePoint command line management program on the server with the SharePoint management center, use a password to change the search topology.
Note:: Before adding a search component to a new server, you must start the search service instance on the new server. The search service instance starts all windows services required by the Search Service (osearch15 and spsearchhostcontroller). The following example shows how to add a crawling component to the search field.
Example 1: add the crawler component:
Step 1: run the sharepoint2013 command line management program as an administrator on the server hosting the management center, run the $
.
Step 2: Run get-spenterprisesearchserviceinstance-identity $
Step 3: run the following password to copy a search topology. to make any changes to the search topology, you must first create a new topology object.
$ SSA = Get-spenterprisesearchserviceapplication
$ Active = Get-spenterprisesearchtopology-searchapplication $ SSA-active
$ Clone = new-spenterprisesearchtopology-searchapplication $ SSA-clone-searchtopology $ active
Step 4: run the following password to add a crawling component to the specified server.
New-spenterprisesearchcrawlcomponent-searchtopology $ clone-searchserviceinstance $ Hosta
Step 5: confirm that the new crawling component has been added to the cloned topology.
Get-spenterprisesearchcomponent-searchtopology $ clone
We can see that there is an additional crawlcomponent1 in spserver3
Step 6: run the following password to activate the cloned search topology to the official search topology. This will take some time.
Set-spenterprisesearchtopology-identity $ clone
Example 2: delete a crawler component:
Step 1 to step 3 of deleting a crawler component is the same as adding a crawler component, both obtain the search instance $ Hosta of the server where the component to be deleted is located and copy $ clone of the current search topology.
Step 1: run the following command to obtain the search service instance on the specified server.
$ <Host n> = Get-spenterprisesearchserviceinstance-Identity "<Server Name>"
.
Step 2: run the following password to copy a search topology. to make any changes to the search topology, you must first create a new topology object.
$ SSA = Get-spenterprisesearchserviceapplication
$ Active = Get-spenterprisesearchtopology-searchapplication $ SSA-active
$ Clone = new-spenterprisesearchtopology-searchapplication $ SSA-clone-searchtopology $ active
Step 3: run the following command to find the ID of the component to be deleted
Get-spenterprisesearchcomponent-searchtopology $ clone
Step 4: run the following command to delete the component
Remove-spenterprisesearchcomponent-identity <Search Component ID>-searchtopology $ clone
Step 5: run the password to activate the cloned topology to the official topology.
Set-spenterprisesearchtopology-identity $ clone
The steps for adding and deleting analysis and processing components, content processing components, crawling components, search management components, and query and processing components are the same. The only difference is that the commands for new components are different. The addition and deletion of index components are different from those of the preceding five components. For details, see: Manage index components.
Retrieve the search service instance on the specified server
$ <Host n> = Get-spenterprisesearchserviceinstance-Identity "<Server Name>"
Start to search for a service instance on the specified server
Start-spenterprisesearchserviceinstance-identity $ hostb
Retrieve the search service instance on the specified server
Get-spenterprisesearchserviceinstance-identity $
Search Activity search Topology
$ SSA = Get-spenterprisesearchserviceapplication
$ Active = Get-spenterprisesearchtopology-active-searchapplication $ SSA
$ Active
Search Activity search topology list
$ SSA = Get-spenterprisesearchserviceapplication
$ Active = Get-spenterprisesearchtopology-searchapplication $ SSA-active
Get-spenterprisesearchcomponent-searchtopology $ active
Cloning activity search Topology
$ SSA = Get-spenterprisesearchserviceapplication
$ Active = Get-spenterprisesearchtopology-searchapplication $ SSA-active
$ Clone = new-spenterprisesearchtopology-searchapplication $ SSA-clone-searchtopology $ active
Add search management component
New-spenterprisesearchadmincomponent
Add a query analysis component
New-spenterprisesearchanalyticsprocessingcomponent
Add content management component
New-spenterprisesearchcontentprocessingcomponent
Add a crawler
New-spenterprisesearchcrawlcomponent
Add a query analysis component
New-spenterprisesearchqueryprocessingcomponent
Remove Search Component
Remove-spenterprisesearchcrawlcomponent-identity <component ID>-searchtopology $ clone
Activate Topology
Set-spenterprisesearchtopology-identity $ clone