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

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:

  1. Add references to your application for the following dlls:

    • Microsoft.SharePoint.dll

    • Microsoft.Office.Server.dll

    • Microsoft.Office.Server.Search.dll

  2. 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>")));

See Also

Reference

Schema Class

Schema Members

Microsoft.Office.Server.Search.Administration Namespace