Configure User segmentation in SharePoint 2013 Search Zero Code Solution

 Display content you tailor for user segments or context you define—for example, based on locale, interests, gender, Department, Skills etc.

The concept of "User Segmentation" is a new feature in SharePoint 2013 Search that allows you to view search results based on user attributes, called "User Segments".

When I speak of attributes, these are only attributes coming from the user's profile.

Scenario chosen for this article

"People Skills or Interests" which is "SPS-Skills" or “Department” Internal name in SharePoint user profile property.

  1. Need to filter the record against the People Skills or People Department in User Profile Property.
  2. User Profile property should have the value or terms in People Skills and People Department.


Step 1:- Define the People Skill in Managed Metadata services:-









Step 2:- Set above taxonomy terms in the User Profile property of the user i.e. SPS-Skills (Internal name of skill).



Step3:- Add Managed Metadata column in List or Library where we need to tag the content or Enable the Enterprise Keyword
Step4:- Add Skill Keyword i.e. Terms against the content in List or Library in Managed Metadata or Enterprise keyword column.

Step5:- Add Managed Metadata or Enterprise Keyword column as Managed Property in Search Schema and Perform the Full Crawl.

Step6:-Configure the OOTB Search Result Web Part in the search center with following steps:-

               




Note: - How Query variables with multiple values (Important)
Some query variables may return multiple values like Skills or Interest. For query variables that return multiple values, the following syntax must be used: {|ManagedProperty:{QueryVariable}}.
All the query variable values will be combined by using the bitwise OR operation. For example, say that you have a term set that is used to categorized interest of users. All users are configured to have one or more interests using the multi-value property SPS-Interests in the User Profile Service Application. To issue a query for any of the interests of the current user, the following syntax could be used: {|owstaxIdMetadataAllTagsInfo:{User.SPS-Skills}}.
 If the current user is configured to have two interests — .Net (#0f95d1fdf-781f-42f4-99f9-c656c1341b2e) and SharePoint (#0c2cff933-9377-4692-aa98-ce59768aa38b) — the query will be transformed to (owstaxIdMetadataAllTagsInfo: #0f95d1fdf-781f-42f4-99f9-c656c1341b2e) OR (owstaxIdMetadataAllTagsInfo: #0c2cff933-9377-4692-aa98-ce59768aa38b).

There are some restrictions with using multiple values. Only the OR operator ({|) is supported for multiple values. The AND operator is not supported. Also, only columns of type Managed Metadata work correctly for multiple value cases. Other types of columns that may use multiple values, such as columns of type Person or Group or Choice, the items will be expanded into a delimited string.

Ref:-


No comments:

Post a Comment