Schema 构造函数 (Microsoft.Office.Server.Search.Administration)

Initializes a new instance of the Schema class.

命名空间: Microsoft.Office.Server.Search.Administration
程序集: Microsoft.Office.Server.Search (在 microsoft.office.server.search.dll 中)

语法

声明
Public Sub New ( _
    searchApplication As SearchContext _
)
用法
Dim searchApplication As SearchContext

Dim instance As New Schema(searchApplication)
public Schema (
    SearchContext searchApplication
)

参数

  • searchApplication
    A SearchContext object that represents the search service for a specific Shared Service Provider.

备注

The Schema class is the entry point for managing the 企业级搜索 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 如何:返回搜索服务提供程序的搜索上下文.

示例

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:

如何:检索共享服务提供程序的托管属性

如何:创建托管属性

如何:删除托管属性

如何:为搜索架构中的类别检索已爬网属性

如何:检索映射到托管属性的已爬网属性

如何:将已爬网属性映射到托管属性

Schema sspSchema = new Schema(SearchContext.GetContext(new SPSite("http://<yourSiteName>")));

另请参阅

参考

Schema 类
Schema 成员
Microsoft.Office.Server.Search.Administration 命名空间