Share via


: SearchContext (Clase) (Microsoft.Office.Server.Search.Administration)

Represents the search service instance for a Shared Services Provider (SSP).

Espacio de nombres:
Ensamblado: Microsoft.Office.Server.Search (in microsoft.office.server.search.dll)

Sintaxis

'Declaración
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
Public NotInheritable Class SearchContext
'Uso
Dim instance As SearchContext
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
public sealed class SearchContext

Comentarios

The SearchContext object is the entry point to the Enterprise SearchN.Microsoft.Office.Server.Search.Administration object model. The GetContext method returns the search context for site, server, or SSP that you specify.

Nota

If you use the GetContext overload of the SearchContext class to retrieve the search context, we recommend that your code instantiates the SPSite object within a using statement to ensure the object is released once it's no longer needed. The code in the Example section demonstrates how to do this.

For more information about the SearchContext class and the Enterprise Search Administration object model, see Introducción al modelo de objetos de administración del motor de búsqueda Enterprise Search and Procedimiento: Devolver el contexto de búsqueda para el proveedor del servicio de búsqueda.

Ejemplo

[C#]

SearchContext context;
using (SPSite site = new SPSite("http://yourSiteName"))
{
     context = SearchContext.GetContext(site);

}

Jerarquía de herencia

System.Object
  Microsoft.Office.Server.Search.Administration.SearchContext

Seguridad de subprocesos

Todos los miembros estáticos públicos (compartidos en Visual Basic) de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancia sean seguros para los subprocesos.

Vea también

Referencia

SearchContext (Miembros)
Microsoft.Office.Server.Search.Administration (Espacio de nombres)