Share via


CrawlRule Class

Represents a crawl rule.

Inheritance Hierarchy

System.Object
  Microsoft.Office.Server.Search.Administration.CrawlRule

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

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class CrawlRule
'Usage
Dim instance As CrawlRule
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class CrawlRule

Remarks

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.

Use the CrawlRules property of the Content class to get the collection of crawl rules for a Shared Service Provider.

To add a new crawl rule to the collection, use the Create() method of the CrawlRuleCollection class.

To delete a crawl rule, use the Delete method of the CrawlRule class.

Use an indexer to return a CrawlRule object from the CrawlRuleCollection class. For example, assuming the collection is assigned to a variable named sspCrawlRules, use sspCrawlRules[index] in Microsoft Visual C# or sspCrawlRules(index) in Microsoft Visual Basic, where index is an integer representing the crawl rule priority, or a string containing the crawl rule path.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

CrawlRule Members

Microsoft.Office.Server.Search.Administration Namespace