Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CrawlRule class
Collapse the table of content
Expand the table of content

CrawlRule class

Represents a crawl rule.


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

[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class CrawlRule

Use the CrawlRules property of the Content class to get the collection of crawl rules for a Search service application.

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 crawlRules, use crawlRules[index] in Microsoft Visual C# or crawlRules(index) in Microsoft Visual Basic, where index is an integer representing the crawl rule priority, or a string containing the crawl rule path.

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