Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

New-SPEnterpriseSearchQueryTopology

SharePoint 2010

Published: May 12, 2010

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>]]

Parameters

1

Parameter

Required

Type

Description

SearchApplication

Required

Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind

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.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

noteNote:

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.

Clone

Optional

System.Management.Automation.SwitchParameter

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

Confirm

Optional

System.Management.Automation.SwitchParameter

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

QueryTopology

Optional

Microsoft.Office.Server.Search.Cmdlet.QueryTopologyPipeBind

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.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

2

Parameter

Required

Type

Description

SearchApplication

Required

Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind

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.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

noteNote:

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.

Clone

Optional

System.Management.Automation.SwitchParameter

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

Confirm

Optional

System.Management.Automation.SwitchParameter

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

Partitions

Optional

System.String

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.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

Detailed Description

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.

Input Types

 

Return Types

 

------------------EXAMPLE------------------

$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.

Change History

 

Date Description Reason

May 12, 2010

Initial publication

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