Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize


Search Server 2010

Applies to: SharePoint Server 2010

Topic Last Modified: 2010-05-07

Adds a query topology to a shared search application.

New-SPEnterpriseSearchQueryTopology -SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Clone <SwitchParameter>] [-Clone <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-QueryTopology <QueryTopologyPipeBind>] [-WhatIf [<SwitchParameter>]]
New-SPEnterpriseSearchQueryTopology -SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Clone <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-Partitions <String>] [-WhatIf [<SwitchParameter>]]

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.

The New-SPEnterpriseSearchQueryTopology cmdlet is used when the search functionality is initially configured or when a new query topology is created. A search service application can contain multiple query topologies when a query component or index partition is added to or deleted from a topology.


Parameter Required Type Description




Specifies the search application that contains the query topology.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.




Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.




Specifies that the new query topology is created by cloning an existing query topology.




Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters




Specifies the number of query partitions to use for the new query topology.

The type must be a valid string that indicates a number less than or equal to 256.




Specifies the query topology to clone for the new query topology.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, or an instance of a valid QueryTopology object.




Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters


$ssa = GetSPEnterpriseSearchServiceApplication
$qtOld = $ssa | Get-SPEnterpriseSearchQueryTopology -Active
$ssInstance = Get-SPEnterpriseSearchServiceInstance -Local
$qtNew = $ssa | New-SPEnterpriseSearchQueryTopology -Partitions 1 
$idxPartition = (Get-SPEnterpriseSearchIndexPartition -QueryTopology $qtOld)
$queryComponent = New-SPEnterpriseSearchQuerycomponent -QueryTopology $qtNew -IndexPartition $idxPartition -SearchServiceInstance $ssInstance
$qtNew | Set-SPEnterpriseSearchQueryTopology -Active
$qtOld | Remove-SPEnterpriseSearchQueryTopology

This example creates a query topology with a single partition and creates a query component for that topology. It sets the new query topology as the active query topology of a search service application named MySSA, and deletes the old topology.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft