Utility.AddScopeToQuery
The AddScopeToQuery method adds a search path to the Query property of the Query object.
Do not confuse this with ScopeAdm, which is the Indexing Service administration object that defines the paths to index.
Syntax
objUtility.AddScopeToQuery(objQuery, strPath[,strDepth])
- objUtility
- The utility object.
- objQuery
- Required. The Query object using this scope.
- strPath
- Required. String. The physical or virtual path of the scope to add.
- strDepth
- Optional. String. Case-insensitive. Whether the scope covers only the named directory ("shallow") or the named directory and all its subdirectories ("deep").
Remarks
When you first create an instance of the Query object or when you reset it, Query defaults to the entire catalog. The first time you call AddScopeToQuery, the specified scope replaces the default value. Subsequent calls to AddScopeToQuery append the additional scopes to a collection of scopes.
Example
' Replace default value with a specific scope.
objUtility.AddScopeToQuery objQuery, "/sources", "deep"
Windows 2000 or later: Requires Windows 2000 or later.
Import Library: Included as a resource in ixsso.dll.