Set-SPEnterpriseSearchQueryKeyword
設定共用搜尋應用程式之關鍵字用詞的屬性。
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
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 台取得關鍵字的參考,其中包含 Engineering 一詞,並設定 關鍵字的開始日期和結束日期。
參數
-AssignmentCollection
管理物件以適當處置它們。 使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。 您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。 使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。
使用 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。
此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;格式為 https://server_name 的有效 URL;或有效之 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 |