Muokkaa

Jaa


Set-SPEnterpriseSearchQueryKeyword

Sets the properties of a keyword term for a shared search application.

Syntax

Set-SPEnterpriseSearchQueryKeyword
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-Contact <String>]
   [-Definition <String>]
   [-EndDate <DateTime>]
   -Identity <KeywordPipeBind>
   [-ReviewDate <DateTime>]
   -Site <SPSitePipeBind>
   [-StartDate <DateTime>]
   [-Term <String>]
   [-WhatIf]
   [<CommonParameters>]

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.

You can use this cmdlet for keywords in site collections that are in SharePoint Server mode.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples

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

Get-SPEnterpriseSearchQueryKeyword -Identity Engineering -Site https://myserver/sites/engineering | Set-SPEnterpriseSearchQueryKeyword -StartDate "12/25/2009" -EndDate "12/24/2010" -Site https://myserver/sites/engineering

This example gets a reference to the keyword with the term Engineering from the site https://myserver/sites/engineering and sets the start dates and end dates for the keyword.

Parameters

-AssignmentCollection

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.

Type:SPAssignmentCollection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Confirm

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

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Contact

Specifies the user name associated with the new keyword.

The type must be a valid user name; for example, KeywordUser1.

Type:String
Aliases:c
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Definition

Specifies the definition of the new keyword term.

The type must be a valid string; for example, a keyword term definition.

Type:String
Aliases:d
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-EndDate

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.

Type:DateTime
Aliases:e
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identity

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.

Type:KeywordPipeBind
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-ReviewDate

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.

Type:DateTime
Aliases:r
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Site

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 https://server_name; or an instance of a valid SPSite object.

Type:SPSitePipeBind
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-StartDate

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.

Type:DateTime
Aliases:s
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Term

Specifies the keyword term that triggers keyword results.

The type must be a valid string; for example, a keyword term.

Type:String
Aliases:t
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition