Set-SPEnterpriseSearchQueryKeyword
Applies to: SharePoint Server 2010
Topic Last Modified: 2010-02-11
Sets the properties of a keyword term for a shared search application.
Syntax
Set-SPEnterpriseSearchQueryKeyword [-Identity] <KeywordPipeBind> -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Contact <String>] [-Definition <String>] [-EndDate <Nullable>] [-ReviewDate <Nullable>] [-StartDate <Nullable>] [-Term <String>] [-WhatIf [<SwitchParameter>]]
Detailed Description
The Set-SPEnterpriseSearchQueryKeyword cmdlet updates properties and rules of a keyword term. A query keyword is a query component of a query topology. SPEnterpriseSearchQueryKeyword represents relevance setting through keywords.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Required |
Microsoft.Office.Server.Search.Cmdlet.KeywordPipeBind |
Specifies the keyword term to update. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid string that contains a keyword term (for example, KeywordTerm1); or an instance of a valid Keyword 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. Note 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. |
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 |
Contact |
Optional |
System.String |
Specifies the user name associated with the new keyword. The type must be a valid user name; for example, KeywordUser1. |
Definition |
Optional |
System.String |
Specifies the definition of the new keyword term. The type must be a valid string; for example, a keyword term definition. |
EndDate |
Optional |
System.Nullable |
Specifies the expiration date of the keyword term. The default value is MaxDate. The type must be a valid DateTime type, in the form 2010,12,05. |
ReviewDate |
Optional |
System.Nullable |
Specifies the review date of the keyword term. The default value is MaxDate. The type must be a valid DateTime type, in the form 2010,12,05. |
SearchApplication |
Optional |
Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind |
Specifies the search application that contains the query keyword collection. 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. |
Site |
Optional |
Microsoft.SharePoint.PowerShell.SPSitePipeBind |
Associates the new keyword term to the specified results URL. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form http://server_name; or an instance of a valid SPSite object. |
StartDate |
Optional |
System.Nullable |
Specifies the activation date for the keyword term. The default value is the current date. The type must be a valid date, in the form 2010,12,05. |
Term |
Optional |
System.String |
Specifies the keyword term that triggers keyword results. The type must be a valid string; for example, a keyword term. |
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 |
Input Types
Return Types
Example
------------------EXAMPLE------------------
Get-SPEnterpriseSearchQueryKeyword -Identity Engineering -Site http://myserver/sites/engineering | Set-SPEnterpriseSearchQueryKeyword -StartDate "12/25/2009" -EndDate "12/24/2010" -Site http://myserver/sites/engineering
This example gets a reference to the keyword with the term Engineering
from the site http://myserver/sites/engineering
, and sets the start dates and end dates for the keyword.