New-SPEnterpriseSearchMetadataManagedProperty
新增受管理屬性至共用搜尋應用程式。
Syntax
New-SPEnterpriseSearchMetadataManagedProperty
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-DefaultForQueryIndependentRank <UInt32>]
[-Description <String>]
[-EnabledForQueryIndependentRank <Boolean>]
[-EnabledForScoping <Boolean>]
[-FullTextQueriable <Boolean>]
[-IncludeInAlertSignature <Boolean>]
[-IncludeInMd5 <Boolean>]
-Name <String>
[-NameNormalized <Boolean>]
[-NoWordBreaker <Boolean>]
[-Queryable <Boolean>]
[-RemoveDuplicates <Boolean>]
[-RespectPriority <Boolean>]
[-Retrievable <Boolean>]
[-SafeForAnonymous <Boolean>]
-SearchApplication <SearchServiceApplicationPipeBind>
[-SiteCollection <Guid>]
[-Tenant <Guid>]
-Type <Int32>
[-UserFlags <Int16>]
[-WhatIf]
[<CommonParameters>]
Description
此 Cmdlet 會建立新的 Managed 屬性。 SPEnterpriseSearchMetadataManagedProperty 代表企業搜尋中繼資料屬性架構中的 Managed 屬性。
如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet。
範例
------------------範例------------------
$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchMetadataManagedProperty -Name AboutMeUpdate -SearchApplication $ssa -Type 4
此範例會在預設的搜尋服務應用程式中建立名為 AboutMeUpdate 的新 Managed 屬性,並將其類型設定為 DateTime。
參數
-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 |
-DefaultForQueryIndependentRank
指定 Managed 屬性在查詢獨立排名 (相關性) 中使用時為必要屬性。
Type: | UInt32 |
Aliases: | def |
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 |
-Description
將描述新增至中繼資料 Managed 屬性。
其類型必須為有效的字串。
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 |
-EnabledForQueryIndependentRank
指定 Managed 屬性在自訂排名模型中用於與查詢無關的排名工作時為必要屬性。
此類型必須是自訂模型 XML 中下列與查詢無關的排名功能之一:
- queryIndependentFeature
- categoryFeature
- languageFeature
Type: | Boolean |
Aliases: | qir |
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 |
-EnabledForScoping
指定 Managed 屬性可以在範圍定義中使用。
Type: | Boolean |
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 |
-FullTextQueriable
指定 Managed 屬性可用於企業搜尋 SQL 查詢。
Type: | Boolean |
Aliases: | f |
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 |
-IncludeInAlertSignature
指定此 Managed 屬性是否應該包含在警示簽章中。
Type: | Boolean |
Aliases: | ia |
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 |
-IncludeInMd5
指定 Managed 屬性包含在編目程式用來判斷檔是否已變更的雜湊中。
Type: | Boolean |
Aliases: | im5 |
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 |
-Name
指定新 Managed 屬性的名稱。
此類型必須是 Managed 屬性的有效名稱,例如 ManagedProperty1。
Type: | String |
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 |
-NameNormalized
指定 Managed 屬性的值是否應該正規化,也就是啟用 傳回與查詢中所使用之字母大小寫和變音符號無關的結果。 如果 value 設定為 true,則會正規化值。
Type: | Boolean |
Aliases: | nn |
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 |
-NoWordBreaker
指定這個 Managed 屬性的值由斷詞工具處理。
Type: | Boolean |
Aliases: | nw |
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 |
-Queryable
指定這個 Managed 屬性是否可查詢。
Type: | Boolean |
Aliases: | q |
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 |
-RemoveDuplicates
指定移除 Managed 屬性的重複值。
Type: | Boolean |
Aliases: | rd |
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 |
-RespectPriority
指定當對應的編目屬性包含多個值且 RespectPriority 設定為 true 時,只會複製第一個對應的編目屬性。 否則,會複製具有 值的所有對應編目屬性。
Type: | Boolean |
Aliases: | rp |
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 |
-Retrievable
指定這個 Managed 屬性是否可擷取。
Type: | Boolean |
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 |
-SafeForAnonymous
指定是否可接受在匿名搜尋的搜尋結果中顯示 屬性的內容。
Type: | Boolean |
Aliases: | sfa |
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 |
-SearchApplication
指定包含 Managed 屬性集合的搜尋應用程式。
此類型必須是有效的搜尋應用程式名稱 (例如 SearchApp1),或有效的 SearchServiceApplication 物件執行個體。
Type: | SearchServiceApplicationPipeBind |
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 |
-SiteCollection
指定傳回的 Managed 屬性在網站集合 (SPSite) 範圍內。
此類型必須是可以 12345678-90ab-cdef-1234-567890bcdefgh 格式指定屬性集的有效 GUID。
Type: | Guid |
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 |
-Tenant
指定傳回的 Managed 屬性在承租人範圍內。
此類型必須是可以 12345678-90ab-cdef-1234-567890bcdefgh 格式指定屬性集的有效 GUID。
Type: | Guid |
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 |
-Type
指定新 Managed 屬性的資料類型。
此類型必須是下列其中一種資料類型:
1 = 文字
2 = 整數
3 = 十進位
4 = DateTime
5 = 是否
6 = 二進位
7 = 雙精度浮點數
Type: | Int32 |
Aliases: | t |
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 |
-UserFlags
保留供日後使用。
Type: | Int16 |
Aliases: | u |
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 |