Recommended steps to Remove Search Components from Search Service Application?

adil 1,431 Reputation points
2023-09-04T08:25:56.9166667+00:00

Hi

I Created a search service application and its components deployed to 2 Application servers with Custom Roles, now i want to remove all Search Components from one of application server what are the recommended steps to remove search components from search service application?

its SharePoint 2019 On Premise

Microsoft 365 and Office | SharePoint Server | For business
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,846 Reputation points Microsoft External Staff
    2023-09-05T09:27:20.25+00:00

    For providing correct steps, please provide the screenshot of search topology in the search admin page (search admin page of search service application).

    When two server farms share a search service application, there are at least a total of five search components in two server farms.

    Here is an example for you. Remove a Search Query Component from WFE1, then add to WFE2.

    1.Retrieve a list of search components.

    $ssa = Get-SPEnterpriseSearchServiceApplication 
    $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active 
    Get-SPEnterpriseSearchComponent -SearchTopology $active
    

    Get the ComponentId of Search Query Component.1

    2.Clone the active search topology.

    $ssa = Get-SPEnterpriseSearchServiceApplication
    $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
    $clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone –SearchTopology $active
    

    3.Add a new Search Query Component in WFE2.

    $wfe = Get-SPEnterpriseSearchServiceInstance -Identity WFE2
    New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $clone -SearchServiceInstance $wfe
    

    4.Start the search instance in WFE2.

    Start-SPEnterpriseSearchServiceInstance -Identity $wfe
    

    5.Activate the cloned search topology.

    Set-SPEnterpriseSearchTopology -Identity $clone
    

    6.Clone the search topology again.

    $ssa = Get-SPEnterpriseSearchServiceApplication
    $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
    $clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone –SearchTopology $active
    

    7.Remove the original Search Query Component in WFE1.

    Remove-SPEnterpriseSearchComponent -Identity ComponentId of Search Query Component -SearchTopology $clone -confirm:$false
    

    8.Activate the search topology again.

    Set-SPEnterpriseSearchTopology -Identity $clone
    

    Result:

    1


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.