Microsoft.Search.Query 架构中的 UserContext 元素
上次修改时间: 2015年3月9日
适用范围: SharePoint Server 2010
本文内容
属性
子元素
父元素
元素信息
可将"关键字管理"搜索设置限制为上下文。上下文定义应何时应用搜索设置(通常针对特定的用户组)。
有关详细信息,请参阅关键字管理 (FAST Search Server 2010 for SharePoint)。
有关 Query Web 服务的详细信息,请参阅使用查询 Web Services。
<UserContext includeuserprofile={true|false}>
<UserContextData />
</UserContext>
属性
属性 |
说明 |
---|---|
includeuserprofiles |
指定要应用的用户上下文数据的类型。 true SharePoint 2010 User Profile Service 中的上下文值将作为用户上下文的一部分包含。如果还使用了 UserContextData,则同时使用用户配置文件数据和自定义上下文数据。 false SharePoint 2010 用户配置文件中的上下文值不作为用户上下文的一部分包含。使用 UserContextData 提交自定义用户上下文。 默认值:true |
子元素
父元素
示例
以下是 Microsoft.Search.Query 请求中的 UserContext 元素的示例。有关用户上下文数据字符串的详细信息,请参阅 UserContextData 元素。
<UserContext includeuserprofile="false">
<UserContextData>
<![CDATA[responsibilities:;:developer;tester]]>
</UserContextData>
</UserContext>
元素信息
**架构名称:**Microsoft.Search.Query
适用于:QueryServiceQuery() 方法 (Microsoft.Search.Response.Document)、QueryServiceQueryEx() 方法 (Dataset)
**可选:**是
请参阅
引用
QueryService