Schema Constructor
Initializes a new instance of the Schema class.
Namespace: Microsoft.Office.Server.Search.Administration
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Syntax
'Declaration
Public Sub New ( _
searchApplication As SearchContext _
)
'Usage
Dim searchApplication As SearchContext
Dim instance As New Schema(searchApplication)
public Schema(
SearchContext searchApplication
)
Parameters
- searchApplication
Type: Microsoft.Office.Server.Search.Administration.SearchContext
A SearchContext object that represents the search service for a specific Shared Service Provider.
Remarks
The Schema class is the entry point for managing the Enterprise Search metadata schema for a Shared Service Provider's search service. To use the Schema object, you must do the following:
Add references to your application for the following dlls:
Microsoft.SharePoint.dll
Microsoft.Office.Server.dll
Microsoft.Office.Server.Search.dll
Specify the Shared Service Provider for the search service using the SearchContext object. For more information about ways to retrieve the search context, see How to: Return the Search Context for the Search Service Provider.
Examples
The following code example demonstrates how to use the constructor to create an instance of the Schema class.
To see more complete code samples using the Schema object model, see the following topics:
How to: Retrieve the Managed Properties for a Shared Services Provider
How to: Create a Managed Property
How to: Delete a Managed Property
How to: Retrieve the Crawled Properties for a Category in the Search Schema
How to: Retrieve the Crawled Properties Mapped to a Managed Property
How to: Map a Crawled Property to a Managed Property
Schema sspSchema = new Schema(SearchContext.GetContext(new SPSite("http://<yourSiteName>")));