Export (0) Print
Expand All
7 out of 9 rated this helpful - Rate this topic

Manage search components in SharePoint Server 2013

SharePoint 2013

Published: November 13, 2012

Summary: Learn how to use Windows PowerShell to manage search components in an existing search topology that has content in the search index. Use these procedures to scale out or scale down the search topology of the Search service application.

Applies to:  SharePoint Server 2013 

The procedures and the examples in this article assume that SharePoint Server 2013 and the Search service application are installed, and that there is an existing search topology and items in the search index. If SharePoint Server 2013 and the Search service application are newly installed and there are no items in the search index, follow the procedures in Change the default search topology in SharePoint Server 2013.

The procedures in this article apply to the following search components:

  • Analytics processing component

  • Content processing component

  • Crawl component

  • Search administration component

  • Query processing component

For information about procedures to manage the index component, see Manage the index component in SharePoint Server 2013.

In this article:

Before you begin

Before you begin, review the following prerequisites.

  • SharePoint Server 2013 is installed and a Search service application with a search topology is created. The Search service application is in a healthy state and is not paused for any reason.

  • The user account that is performing the procedures in this article is a member of the Farm Administrators group.

  • You have planned a target search topology. We recommend that you plan a target search topology based on the expected number of items in the search index for search in small, medium or large enterprises. See Enterprise search architectures for SharePoint Server 2013 for recommended search topologies. If you are planning a search topology for internet sites, see Internet sites search architectures for SharePoint Server 2013.

  • SharePoint Server 2013 is installed on all the servers that you want to host search components on. You can create new application servers or define application servers in an existing deployment. The servers are added to the farm and you are an administrator on all these servers.

Important Important:

The procedures in this article use Windows PowerShell. You can run the Windows PowerShell commands on any server in the farm. However, if you are performing multiple search topology procedures you should use the same SharePoint 2013 Management Shell for all Windows PowerShell commands so that you can share Windows PowerShell object references between commands.

Start a search service instance on a server

Before you add search components to a new server, you must first start a search service instance on the server. The search service instance starts all the necessary Windows services that are used by the search service (OSearch15 and SPSearchHostController).

To start a search service instance

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. Start a SharePoint 2013 Management Shell on one of the servers in the farm.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    • For Windows Server 2012:

      1. On the Start screen, right-click SharePoint 2013 Management Shell and then click Run as administrator.

        If SharePoint 2013 Management Shell is not on the Start screen:

      2. Right-click Computer, click All apps, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. At the Windows PowerShell command prompt, type the following command(s):

    $<host n> = Get-SPEnterpriseSearchServiceInstance -Identity "<Server name>"
    Start-SPEnterpriseSearchServiceInstance -Identity $<host n>
    

    Where:

    • $<host n> specifies the PowerShell object reference for the search service instance.

    • <Server name> specifies the server on which you want to add an index component. The input must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a server (for example, myserver1); or an instance of a valid SearchServiceInstance object.

    For example:

    $hostA = Get-SPEnterpriseSearchServiceInstance -Identity "myserver1"
    $hostB = Get-SPEnterpriseSearchServiceInstance -Identity "myserver2"
    Start-SPEnterpriseSearchServiceInstance -Identity $hostA
    Start-SPEnterpriseSearchServiceInstance -Identity $hostB 
    
    

    You use the references ($<host n>) to specify the target server when you add search components.

  4. Wait until all the search service instances are running. For each of the search service instances, at the Windows PowerShell command prompt, type the following command until the command returns the status Online:

    Get-SPEnterpriseSearchServiceInstance -Identity $<host n>
    
    

    For example:

    Get-SPEnterpriseSearchServiceInstance -Identity $hostA
    TypeName    : SharePoint Server Search
    Description : Index content and serve search queries
    Id          : 82ce8815-ecbd-4cf3-a98e-33f20bd86039
    Server      : SPServer Name=myserver1.example.com
    Service     : SearchService Name=OSearch15
    Role        : None
    Status      : Online
    
    

Retrieve the active search topology

To view the active search topology of the Search service application, you have to use Windows PowerShell.

To view the active search topology

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. Start a SharePoint 2013 Management Shell. If you already have an open SharePoint 2013 Management Shell in which you have created reusable Windows PowerShell object references, use the open shell instead.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    • For Windows Server 2012:

      1. On the Start screen, right-click SharePoint 2013 Management Shell and then click Run as administrator.

        If SharePoint 2013 Management Shell is not on the Start screen:

      2. Right-click Computer, click All apps, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. At the Windows PowerShell command prompt, type the following command:

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

The command returns information about the active topology, for example:

TopologyId     : 2d7bb046-1ad4-43a9-9984-754c4551a3ec
CreationDate   : 1/25/2012 3:06:00 AM
State          : Active
ComponentCount : 6

Retrieve a list of search components

To view a list of search components in the active search topology with their properties, you have to use Windows PowerShell. One of the search component properties is the search component Id. You will only need the search component Id to remove a search component.

To view a list of all search components

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. Start a SharePoint 2013 Management Shell. If you already have an open SharePoint 2013 Management Shell in which you have created reusable Windows PowerShell object references, use the open shell instead.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    • For Windows Server 2012:

      1. On the Start screen, right-click SharePoint 2013 Management Shell and then click Run as administrator.

        If SharePoint 2013 Management Shell is not on the Start screen:

      2. Right-click Computer, click All apps, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. At the Windows PowerShell command prompt, type the following command(s):

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

    The command returns a list of search components in the active search topology and their properties.

Clone the active search topology

To make any changes to the search topology in a search installation that has items in the search index, you first have to create a new topology object. You modify this new topology object, a clone of the active topology, by adding or removing search components. After you have made the changes to the clone topology object, you make the clone the active topology.

To clone the active topology

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. Start a SharePoint 2013 Management Shell. If you already have an open SharePoint 2013 Management Shell in which you have created reusable Windows PowerShell object references, use the open shell instead.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    • For Windows Server 2012:

      1. On the Start screen, right-click SharePoint 2013 Management Shell and then click Run as administrator.

        If SharePoint 2013 Management Shell is not on the Start screen:

      2. Right-click Computer, click All apps, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. At the Windows PowerShell command prompt, type the following command(s):

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

    The command creates a clone search topology that can be referenced with $clone if you continue to use the same SharePoint 2013 Management Shell to add or remove search components and to activate the search topology.

  4. (Optional) If you have to remove search components from the search topology, you have to retrieve the search component Id. At the Windows PowerShell command prompt, type the following command(s):

    Get-SPEnterpriseSearchComponent -SearchTopology $clone
    

    The command returns a list of search components in the cloned search topology and their properties, including the search component Id.

Add a search component

You cannot change the active search topology directly. This procedure assumes that you have created a clone topology object as described in Clone the active search topology. You can use the following Windows PowerShell cmdlets for each search component:

  • New-SPEnterpriseSearchAdminComponent

  • New-SPEnterpriseSearchAnalyticsProcessingComponent

  • New-SPEnterpriseSearchContentProcessingComponent

  • New-SPEnterpriseSearchCrawlComponent

  • New-SPEnterpriseSearchQueryProcessingComponent

note Note:

The procedure to add an index component is different. For more information, see Manage the index component in SharePoint Server 2013.

To add a search component

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. Start a SharePoint 2013 Management Shell. If you already have an open SharePoint 2013 Management Shell in which you have created reusable Windows PowerShell object references, use the open shell instead.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    • For Windows Server 2012:

      1. On the Start screen, right-click SharePoint 2013 Management Shell and then click Run as administrator.

        If SharePoint 2013 Management Shell is not on the Start screen:

      2. Right-click Computer, click All apps, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. At the Windows PowerShell command prompt, type the following command(s):

    New-SPEnterpriseSearch<SearchComponent> -SearchTopology $clone -SearchServiceInstance $<host n>
    

    Where:

    For example, the following command adds a content processing component to the clone topology on the server identified by the search service instance reference $hostA.

    New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone -SearchServiceInstance $hostA
    
  4. Verify that the new search component was added to the clone topology. At the Windows PowerShell command prompt, type the command:

    Get-SPEnterpriseSearchComponent -SearchTopology $clone
    

Remove a search component

To remove a search component, you have to use Windows PowerShell. You cannot change the active search topology directly. This procedure assumes that you have created a clone topology object as described in Clone the active search topology.

note Note:

The procedure to remove an index component is different. For more information, see Manage the index component in SharePoint Server 2013.

To remove a search component

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. Start a SharePoint 2013 Management Shell. If you already have an open SharePoint 2013 Management Shell in which you have created reusable Windows PowerShell object references, use the open shell instead.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    • For Windows Server 2012:

      1. On the Start screen, right-click SharePoint 2013 Management Shell and then click Run as administrator.

        If SharePoint 2013 Management Shell is not on the Start screen:

      2. Right-click Computer, click All apps, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. Make sure that the current active topology is healthy and that the search component that you are about to remove is Active. View the status of the search topology in the Search Administration page in Central Administration or run the Windows PowerShell cmdlet Get-SPEnterpriseSearchStatus.

  4. At the Windows PowerShell command prompt, type the following command(s):

    Remove-SPEnterpriseSearchComponent -Identity <Search component id> -SearchTopology $clone
    

    Where:

  5. When prompted, confirm that you want to remove the search component.

Move a search component

If you want to move a search component from one server to another, we recommend that you add a new search component to the search topology before you remove the old search component.

To move a search component

  1. Clone the active search topology. See Clone the active search topology.

  2. Add a new search component to the server that you eventually want the search component to be hosted on. See Add a search component.

  3. Activate the search topology. This topology will have one superfluous search component. See Activate a search topology.

  4. Make sure that the current active topology is healthy. View the status of the search topology in the Search Administration page in Central Administration or run the Windows PowerShell cmdlet Get-SPEnterpriseSearchStatus.

  5. Clone the search topology again. See Clone the active search topology.

  6. Remove the superfluous search component. See Remove a search component.

  7. Activate the search topology again. See Activate a search topology.

Activate a search topology

To activate a search topology, you have to use Windows PowerShell.

To activate a search topology

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. Start a SharePoint 2013 Management Shell. If you already have an open SharePoint 2013 Management Shell in which you have created reusable Windows PowerShell object references, use the open shell instead.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    • For Windows Server 2012:

      1. On the Start screen, right-click SharePoint 2013 Management Shell and then click Run as administrator.

        If SharePoint 2013 Management Shell is not on the Start screen:

      2. Right-click Computer, click All apps, right-click SharePoint 2013 Management Shell and then click Run as administrator.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. At the Windows PowerShell command prompt, type the following command(s):

    Set-SPEnterpriseSearchTopology -Identity $clone
    

    Where:

  4. Verify that your new topology is active. At the Windows PowerShell command prompt, type the following command(s):

    Get-SPEnterpriseSearchTopology -Active -SearchApplication $ssa
    

    The command returns an overview of active and inactive topologies, for example:

    TopologyId     : fce8507d-61c6-4498-8038-4fd2d0a62c6e
    CreationDate   : 1/30/2012 2:52:00 AM
    State          : Inactive
    ComponentCount : 6
    
    TopologyId     : b63d48b2-df5c-41be-a7f4-9abaee483611
    CreationDate   : 1/30/2012 4:30:00 AM
    State          : Active
    ComponentCount : 7
    

    You will see that the component count of the active topology reflects the changes that you have made.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.