New-SPEnterpriseSearchIndexComponent
为给定拓扑和搜索服务实例创建新索引组件。
语法
New-SPEnterpriseSearchIndexComponent
-SearchServiceInstance <SearchServiceInstancePipeBind>
-SearchTopology <SearchTopologyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-IndexPartition <UInt32>]
[-RootDirectory <String>]
[-SearchApplication <SearchServiceApplicationPipeBind>]
[-WhatIf]
[<CommonParameters>]
说明
创建新索引组件并将其添加到特定搜索服务实例中的非活动搜索拓扑。 该更改在启用搜索拓扑时生效。
示例
------------------例子-----------------
$si = Get-SPEnterpriseSearchServiceInstance
$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa
New-SPEnterpriseSearchIndexComponent -SearchTopology $topology -SearchServiceInstance $si -SearchApplication $ssa -IndexPartition 1 -RootDirectory E:\Index
本示例将新的搜索索引组件添加到现有 Search Service 应用程序的非活动拓扑中。 索引组件的目录设置为 E:\Index,分区号为 1。
参数
-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 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 2013, SharePoint Server 2016, SharePoint Server 2019 |
-IndexPartition
指定分配到新搜索索引组件的索引分区号。
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-RootDirectory
指定将保存新的搜索索引组件的索引位置的根目录。 如果您需要为了避免与系统的其他部分或共享相同磁盘的其他系统争用 I/O,或因为您不希望出现索引填满操作系统磁盘(通常为 C:)的风险,则需要此参数。
如果您将根目录指定为卷的根(如 E:),则当删除 SSA 时,将不会清理索引。 然后,必须手动删除 SSA。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SearchApplication
指定包含搜索拓扑的 Search Service 应用程序。
Type: | SearchServiceApplicationPipeBind |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SearchServiceInstance
指定将承载新索引组件的搜索服务实例。
Type: | SearchServiceInstancePipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SearchTopology
指定应将新索引组件添加到的搜索拓扑。
Type: | SearchTopologyPipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | 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 2013, SharePoint Server 2016, SharePoint Server 2019 |