다음을 통해 공유


UserContext Element in Microsoft.Search.Query Schema

Applies to: SharePoint Server 2010

In this article
Attributes
Child Elements
Parent Elements
Element Information

The keyword management search settings can be restricted to context. A context defines when a search setting should apply, typically targeting a specific group of users.

For more information, see Keyword Management (FAST Search Server 2010 for SharePoint).

For more information about the Query Web service, see Using the Query Web Service.

<UserContext includeuserprofile={true|false}>
   <UserContextData />
</UserContext>

Attributes

Attribute

Description

includeuserprofiles

Specifies the type of user context data to be applied.

true  Context values from the SharePoint 2010 user profile service will be included as part of the user context. If UserContextData is also used, the user profile data and the custom context data are both used.

false  Context values from the SharePoint 2010 user profile are not included as part of the user context. Use UserContextData to submit custom user contexts.

Default: true

Child Elements

UserContextData Element

Parent Elements

Query Element in Microsoft.Search.Query Schema

Example

Following is an example of the UserContext element in a Microsoft.Search.Query request. For details on the user context data string, see UserContextData Element.

<UserContext includeuserprofile="false">
   <UserContextData>
      <![CDATA[responsibilities:;:developer;tester]]>
   </UserContextData>
</UserContext>

Element Information

Schema name: Microsoft.Search.Query

Applies to: QueryServiceQuery() method (Microsoft.Search.Response.Document), QueryServiceQueryEx() method (Dataset)

Optional: Yes

See Also

Reference

QueryService

Concepts

Keyword Management (FAST Search Server 2010 for SharePoint)

Using the Query Web Service

Walkthrough: Querying SharePoint Search From a Client Application