CrawlRuleCollection.SetPriority Method

Sets the priority for a crawl rule.

Namespace:  Microsoft.Office.Server.Search.Administration
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

Syntax

'Declaration
Public Sub SetPriority ( _
    rule As CrawlRule, _
    priority As Integer _
)
'Usage
Dim instance As CrawlRuleCollection
Dim rule As CrawlRule
Dim priority As Integer

instance.SetPriority(rule, priority)
public void SetPriority(
    CrawlRule rule,
    int priority
)

Parameters

  • priority
    Type: System.Int32
    A 32-bit integer between 1 and the value of the Count property of the CrawlRuleCollection object, that specifies the priority setting for the crawl rule.

Remarks

The priority setting is the order in which the crawl rules are executed by the Enterprise Search index engine, so the value for this setting, represented by the Priority property of the CrawlRule class, is different for each crawl rule. When the priority setting for a crawl rule in the collection is updated by using the SetPriority method, the remaining crawl rules with priority settings greater than or equal to the new setting also have their priority settings adjusted.

For more information about crawl rules and the new Enterprise Search Administration object model, see Defining Crawl Rules and File Types and Getting Started with the Search Administration Object Model.

See Also

Reference

CrawlRuleCollection Class

CrawlRuleCollection Members

Microsoft.Office.Server.Search.Administration Namespace