Set-SPEnterpriseSearchCrawlContentSource

 

适用于: SharePoint Server 2010

上一次修改主题: 2015-03-09

设置共享搜索应用程序的爬网内容源的属性。

Syntax

Set-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm [<SwitchParameter>]] [-CrawlPriority <Nullable>] [-CustomProtocol <String>] [-LOBSystemSet <String[]>] [-MaxPageEnumerationDepth <Nullable>] [-MaxSiteEnumerationDepth <Nullable>] [-Name <String>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-StartAddresses <String>] [-Tag <String>] [-WhatIf [<SwitchParameter>]]

Set-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm [<SwitchParameter>]] [-CrawlPriority <Nullable>] [-CustomProtocol <String>] [-LOBSystemSet <String[]>] [-MaxPageEnumerationDepth <Nullable>] [-MaxSiteEnumerationDepth <Nullable>] [-Name <String>] [-RemoveCrawlSchedule <SwitchParameter>] [-ScheduleType <Nullable>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-StartAddresses <String>] [-Tag <String>] [-WhatIf [<SwitchParameter>]]

Set-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind> -ScheduleType <Nullable> [-AssignmentCollection <SPAssignmentCollection>] [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm [<SwitchParameter>]] [-CrawlPriority <Nullable>] [-CrawlScheduleRepeatDuration <Nullable>] [-CrawlScheduleRepeatInterval <Nullable>] [-CrawlScheduleRunEveryInterval <Nullable>] [-CrawlScheduleStartDateTime <Nullable>] [-CustomProtocol <String>] [-DailyCrawlSchedule <SwitchParameter>] [-LOBSystemSet <String[]>] [-MaxPageEnumerationDepth <Nullable>] [-MaxSiteEnumerationDepth <Nullable>] [-Name <String>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-StartAddresses <String>] [-Tag <String>] [-WhatIf [<SwitchParameter>]]

Set-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm [<SwitchParameter>]] [-CrawlPriority <Nullable>] [-CrawlScheduleDaysOfMonth <Nullable>] [-CrawlScheduleMonthsOfYear <Nullable>] [-CrawlScheduleRepeatDuration <Nullable>] [-CrawlScheduleRepeatInterval <Nullable>] [-CrawlScheduleStartDateTime <Nullable>] [-CustomProtocol <String>] [-LOBSystemSet <String[]>] [-MaxPageEnumerationDepth <Nullable>] [-MaxSiteEnumerationDepth <Nullable>] [-MonthlyCrawlSchedule <SwitchParameter>] [-Name <String>] [-ScheduleType <Nullable>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-StartAddresses <String>] [-Tag <String>] [-WhatIf [<SwitchParameter>]]

Set-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm [<SwitchParameter>]] [-CrawlPriority <Nullable>] [-CrawlScheduleDaysOfWeek <Nullable>] [-CrawlScheduleRepeatDuration <Nullable>] [-CrawlScheduleRepeatInterval <Nullable>] [-CrawlScheduleRunEveryInterval <Nullable>] [-CrawlScheduleStartDateTime <Nullable>] [-CustomProtocol <String>] [-LOBSystemSet <String[]>] [-MaxPageEnumerationDepth <Nullable>] [-MaxSiteEnumerationDepth <Nullable>] [-Name <String>] [-ScheduleType <Nullable>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-StartAddresses <String>] [-Tag <String>] [-WeeklyCrawlSchedule <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

详细说明

在最初配置搜索功能时以及在添加任何新内容源之后,Set-SPEnterpriseSearchCrawlContentSource cmdlet 将更新爬网内容源的规则。将调用一次此 cmdlet,以便为内容源设置增量爬网计划,然后再重新调用此 cmdlet 以设置完全爬网计划。

Parameters

参数 是否必需 类型 说明

Identity

可选

Microsoft.Office.Server.Search.Cmdlet.ContentSourcePipeBind

指定要更新的爬网内容源。

键入的值必须为 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID;ContentSource 对象的有效名称(如 ContentSource1);或有效 ContentSource 对象的实例。

ScheduleType

必需

System.Nullable

指定爬网计划的类型。

键入的值必须是以下值之一:Full 或 Incremental。

AssignmentCollection

可选

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

管理对象以便正确进行处理。使用 SPWebSPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。在使用 SPWebSPSiteSPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。

备注

在使用 Global 参数时,所有对象均包含在全局存储中。如果未立即使用对象,或未通过使用 Stop-SPAssignment 命令来处理对象,则可能会发生内存不足的情况。

BDCApplicationProxyGroup

可选

Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyGroupPipeBind

指定用于 business 类型内容源的代理。此代理组必须包含默认业务数据连接元数据存储代理。

Confirm

可选

System.Management.Automation.SwitchParameter

在执行命令之前提示您确认。有关详细信息,请键入以下命令:get-help about_commonparameters

CrawlPriority

可选

System.Nullable

指定此内容源的优先级。

键入的值必须是以下整数之一:1=普通,2=高。

CrawlScheduleDaysOfMonth

可选

System.Nullable

指定在设置 MonthlyCrawlSchedule 参数时要进行爬网的日期。

CrawlScheduleDaysOfWeek

可选

System.Nullable

指定在设置 WeeklyCrawlSchedule 参数时要进行爬网的日期。

CrawlScheduleMonthsOfYear

可选

System.Nullable

指定在设置 MonthlyCrawlSchedule 参数时要进行爬网的月份。

CrawlScheduleRepeatDuration

可选

System.Nullable

指定爬网计划的重复次数。

CrawlScheduleRepeatInterval

可选

System.Nullable

指定每次重复爬网计划的间隔分钟数。

CrawlScheduleRunEveryInterval

可选

System.Nullable

指定两次爬网之间的间隔。

如果设置了 DailyCrawlSchedule 参数,则指定爬网的间隔天数。

如果设置了 WeeklyCrawlSchedule 参数,则指定爬网的间隔周数。

CrawlScheduleStartDateTime

可选

System.Nullable

指定爬网的初始日期。默认值为当前的午夜。

CustomProtocol

可选

System.String

指定由自定义连接器处理的用于此内容源的自定义协议。

DailyCrawlSchedule

可选

System.Management.Automation.SwitchParameter

计划基于爬网的间隔天数。

LOBSystemSet

可选

System.String[]

business 类型内容源指定一个以逗号分隔的业务数据连接元数据存储系统名称和系统实例名称的列表。

MaxPageEnumerationDepth

可选

System.Nullable

webcustom 类型内容源指定爬网程序从开始地址爬网到内容项可执行的页面跃点数。

MaxSiteEnumerationDepth

可选

System.Nullable

webcustom 类型内容源指定爬网程序从开始地址爬网到内容项可执行的网站跃点数。

MonthlyCrawlSchedule

可选

System.Management.Automation.SwitchParameter

计划基于爬网的间隔月份数。

Name

可选

System.String

为内容源指定新的显示名称。

键入的值必须是有效的内容源名称;例如,ContentSource1。

RemoveCrawlSchedule

可选

System.Management.Automation.SwitchParameter

删除指定的爬网。

SearchApplication

可选

Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind

指定包含内容源的搜索应用程序。

键入的值必须为 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID;有效的搜索应用程序名称(如 SearchApp1);或有效 SearchServiceApplication 对象的实例。

StartAddresses

可选

System.String

指定对此内容源进行爬网的起始 URL 的列表(用逗号分隔)。

键入的值必须为有效的 URL,格式为 http://server_name。

Tag

可选

System.String

指定自定义内容源设置的修改页面的 URL。指定 URL 的字符串最多可包含 1,024 个字符。

键入的值必须为有效的 URL,格式为 http://server_name。

WeeklyCrawlSchedule

可选

System.Management.Automation.SwitchParameter

计划基于爬网的间隔周数。

WhatIf

可选

System.Management.Automation.SwitchParameter

显示一条描述命令作用的消息,而不执行命令。有关详细信息,请键入以下命令:get-help about_commonparameters

输入类型

返回类型

Example

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

$searchapp = Get-SPEnterpriseSearchServiceApplication "SearchApp1"
$cs = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $searchapp ""
$cs | Set-SPEnterpriseSearchCrawlContentSource -ScheduleType Full -DailyCrawlSchedule -CrawlScheduleRunEveryInterval 30
$cs | Set-SPEnterpriseSearchCrawlContentSource -ScheduleType Incremental -DailyCrawlSchedule -CrawlScheduleRepeatInterval 60 -CrawlScheduleRepeatDuration 1440

此示例返回现有内容源 ExampleContentSource1,并创建每 30 天运行一次完全爬网、并在每天的每一小时运行一次增量爬网的计划。

See Also

Reference

Get-SPEnterpriseSearchCrawlContentSource
New-SPEnterpriseSearchCrawlContentSource
Remove-SPEnterpriseSearchCrawlContentSource