SearchScopes Class

The SearchScopes class is the collection of all SearchScope objects defined by the user in the search administration page.

System.Object

Microsoft.SharePoint.Portal.Search.ObjectModel.SearchScopes

Public Constructors

The following table shows the constructors of the SearchScopes class and a brief description of each.

Name Description
SearchScopes Initializes a new instance of the SearchScopes class.
SearchScopes(Microsoft.SharePoint.Portal.PortalContext) Initializes a new instance of the SearchScopes class with a specified portal context.

Public Methods

The following table shows the public methods of the SearchScopes class and a brief description of each.

Name Description
CreateSearchScope(String, Boolean, Microsoft.SharePoint.Portal.Search.ObjectModel.SearchScope) Adds a SearchScope object to the list.
GetAllScopes Gets all SearchScope objects for this SearchScopes collection.
GetSearchScope(String) Gets a SearchScope object for this SearchScopes collection. The GetSearchScope method returns a null if the search scope does not exist.
MoveSearchScope(String, Boolean) Moves a search scope up or down in the list. The sequence of search scopes that appears in the UI is changed.
RemoveSearchScope(String) Removes a SearchScope object from the SearchScopes collection. A default SearchScope object cannot be deleted. You must call the SetDefaultSearchScope(String) method to set another search scope as the default search scope before deleting the current default search scope.
RenameSearchScope(String, String) Changes the name of the search scope.
SetDefaultSearchScope(String) Sets the current search scope as the default scope.

Public Properties

The following table shows the properties of the SearchScopes class, the data type of each property, and a brief description of each.

Name Data type Description
CurrentDefault Int32 Gets the index of the default search scope.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Requirements

Namespace: Microsoft.SharePoint.Portal.Search.ObjectModel

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Security: Code Access Security