New-SPEnterpriseSearchFileFormat

将新的文件格式添加到分析系统。

语法

New-SPEnterpriseSearchFileFormat
   [-FormatId] <String>
   [-FormatName] <String>
   [-MimeType] <String>
   -SearchApplication <SearchServiceApplicationPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

说明

cmdlet 向 New-SPEnterpriseSearchFileFormat 搜索分析系统添加新的文件格式和相应的文件扩展名。 这会将文件格式绑定到搜索分析系统中基于筛选器的格式处理程序。 因此,仅当用户已针对新文件格式安装相应的基于筛选器的格式处理程序(IFilter)时,搜索分析系统才能分析新文件格式。 如果安装的 IFilter 注册了多个文件扩展名,则用户必须使用 New-SPEnterpriseSearchFileFormat cmdlet 向分析系统添加这些文件扩展名的新文件格式。 此外,用户必须确保新文件格式的文件扩展名是文件类型包含列表的成员。 文件类型包含列表基于文件扩展名指定要进行爬网的文件。 该系统仅在重新启动内容处理组件后考虑新文件格式。

有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet

示例

------------------示例------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchFileFormat -SearchApplication $ssa -FormatId foo -FormatName FooApp -MimeType "text/foo"

此示例使用 New-SPEnterpriseSearchFileFormat cmdlet 将具有归属文件扩展名的 FooApp 的新文件格式添加到搜索服务应用程序中由 $ssa 引用的分析系统中

参数

-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
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-FormatId

指定要添加的格式的文件扩展名。

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-FormatName

指定要添加的格式的名称。

通常,这是处理格式的应用程序的名称。

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-MimeType

指定要添加的格式的 MIME 类型。

Type:String
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-SearchApplication

Specifies the search application for which to add the new file format. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type:SearchServiceApplicationPipeBind
Position:Named
Default value:None
Accept pipeline input:True
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
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-工作分配

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
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition