Share via


ISearchCrawlScopeManager::AddUserScopeRule Method

Adds a new crawl scope rule when the user creates a new rule or adds a URL to be indexed.

Syntax

HRESULT AddUserScopeRule(      
    LPCWSTR pszURL,
    BOOL fInclude,
    BOOL fOverrideChildren,
    DWORD fFollowFlags
);

Parameters

  • pszURL
    [in] The URL to be indexed.
  • fInclude
    [in] TRUE if this should be included in all pszUrl searches; otherwise, FALSE.
  • fOverrideChildren
    [in] A BOOL value specifying whether child rules should be overridden. If set to TRUE, this essentially removes all child rules.
  • fFollowFlags
    [in] Sets the FOLLOW_FLAGS to specify whether to follow complex URLs and whether a URL is to be indexed or just followed.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

A scope rule can be a fully qualified URL or a rule with a pattern.

ISearchCrawlScopeManager::AddUserScopeRule overrides any existing scope rule for the URL or pattern.

Windows 7 and later: the CrawlScopeCommandLine code sample, available on Code Gallery and the Windows 7 SDK, demonstrates how to define command line options for Crawl Scope Manager (CSM) indexing operations.