Set-SPEnterpriseSearchQueryKeyword
设置共享搜索应用程序关键字术语的属性。
语法
Set-SPEnterpriseSearchQueryKeyword
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-Contact <String>]
[-Definition <String>]
[-EndDate <DateTime>]
-Identity <KeywordPipeBind>
[-ReviewDate <DateTime>]
-Site <SPSitePipeBind>
[-StartDate <DateTime>]
[-Term <String>]
[-WhatIf]
[<CommonParameters>]
说明
cmdlet Set-SPEnterpriseSearchQueryKeyword
更新关键字术语的属性和规则。
查询关键字是查询拓扑的查询组件。
SPEnterpriseSearchQueryKeyword 代表关键字的相关性设置。
可以将此 cmdlet 用于处于 SharePoint Server 模式的网站集中的关键字。
有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet。
示例
------------------示例------------------
Get-SPEnterpriseSearchQueryKeyword -Identity Engineering -Site https://myserver/sites/engineering | Set-SPEnterpriseSearchQueryKeyword -StartDate "12/25/2009" -EndDate "12/24/2010" -Site https://myserver/sites/engineering
此示例从网站 https://myserver/sites/engineering 获取对关键字的引用,其中包含术语“工程”,并设置关键字的开始日期和结束日期。
参数
-AssignmentCollection
管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。
使用全局参数时,所有对象均包含在全局存储中。
如果未立即使用对象,或未通过使用 Stop-SPAssignment
命令来处理对象,则可能会发生内存不足的情况。
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Confirm
执行命令前,看到确认提示。
有关详细信息,请键入以下命令: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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Contact
指定与新的关键字关联的用户名。
键入的值必须为有效的用户名;例如 KeywordUser1。
Type: | String |
Aliases: | c |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Definition
指定新关键字术语的定义。
键入的值必须为有效字符串;例如关键字术语定义。
Type: | String |
Aliases: | d |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-EndDate
指定关键字术语的过期日期。 默认值为 MaxDate。
键入的值必须是 2010,12,05 形式的有效 DateTime 类型。
Type: | DateTime |
Aliases: | e |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Identity
指定要更新的关键字术语。
键入的值必须为 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID;包含关键字术语的有效字符串(如 KeywordTerm1);或有效 Keyword 对象的实例。
Type: | KeywordPipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ReviewDate
指定关键字术语的检查日期。 默认值为 MaxDate。
键入的值必须是 2010,12,05 形式的有效 DateTime 类型。
Type: | DateTime |
Aliases: | r |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Site
将新的关键字术语关联到指定的结果 URL。
键入的值必须是有效的 GUID(格式为 12345678-90ab-cdef-1234-567890bcdefgh);是有效的 URL(格式为 https://server_name);或者是有效 SPSite 对象的实例。
Type: | SPSitePipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-StartDate
指定关键字术语的激活日期。 默认值为当前日期。
键入的值必须为 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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Term
指定触发关键字结果的关键字术语。
键入的值必须为有效字符串;例如关键字术语。
Type: | String |
Aliases: | t |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-WhatIf
显示一条描述命令作用的消息,而不执行命令。
有关详细信息,请键入以下命令: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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |