ISearchCrawlScopeManager::AddHierarchicalScope method (searchapi.h)
Adds a hierarchical scope to the search engine.
Syntax
HRESULT AddHierarchicalScope(
[in] LPCWSTR pszURL,
[in] BOOL fInclude,
[in] BOOL fDefault,
[in] BOOL fOverrideChildren
);
Parameters
[in] pszURL
Type: LPCWSTR
The URL of the scope to be added.
[in] fInclude
Type: BOOL
TRUE if this is an inclusion scope, FALSE if this is an exclusion scope.
[in] fDefault
Type: BOOL
TRUE if this is to be the default scope, FALSE if this is not a default scope.
[in] fOverrideChildren
Type: BOOL
TRUE if this scope overrides all of the child URL rules, FALSE otherwise.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This method overrides existing scope rules for the URL.The preferred methods for such functionality are ISearchCrawlScopeManager::AddDefaultScopeRule and ISearchCrawlScopeManager::AddUserScopeRule.
URLs passed in as parameters to ISearchCrawlScopeManager::AddHierarchicalScope are expected to be fully URL-decoded and without URL control codes. For example, file:///c:\My Documents is fully URL-decoded, whereas file:///c:\My%20Documents is not.
Windows 7 and later: Check out the CrawlScopeCommandLine code sample to see how to define command line options for Crawl Scope Manager (CSM) indexing operations.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2, Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 with SP1 [desktop apps only] |
Target Platform | Windows |
Header | searchapi.h |
Redistributable | Windows Desktop Search (WDS) 3.0 |