AddContentSource(String, String, Int32, Int32, Boolean, String, String) Method

The AddContentSource method of the SearchCatalog class adds the specified content source to the current portal site.

Parameters

url   Start address for the content source.

sourceGroup   Source group that is used within a search scope to restrict queries to content from this content source.

hops   Constrains the number of paths outside of this content source to crawl.

depth   Constrains the folder depth to which the content source is crawled.

followComplexUrls  true if complex URLS are crawled; otherwise, false.

userName   User name for this content course, if applicable.

password   Password for this content source, if applicable.

Return Value

Microsoft.SharePoint.Portal.Admin.Search.SearchContentSource that represents the content source to add.

Remarks

The AddContentSource method requires the userName and password parameters if the specified content source requires special authentication. Authentication for content sources is implemented by the protocol handler for the content source. If a user name is specified, the AddContentSource method adds a site path rule for this content source.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security