REM search: Shared Fields Synchronization

Technically our solution indexes only Course Offering data and in order for us to get all course properties available for search we actually sync them into all the offering items.

The command to check shared fields helps to understand why search result page does not show needed courses or does not show data that should be shown. REM courses search works correctly if values of the Shared Fields from courses list are duplicated to the course offerings list.

So the command shows the difference between courses and offerings lists i.e. items where shared fields' values are not same. The ideal case is when this command doesn't return anything.

The command may be used with OTB shared fields set OR when you add a custom shared field. Use the following syntax to run the command from SharePoint Management Shell:

Check-REMCourseSharedFields http://rem_url

Run Shared Fields Sync Manually

The normal case is when the system keeps data synchronized automatically. i.e. when a course is updated, changes should be populated to the course offerings.

If Check-REMCourseSharedFields returns entries it means that data is not synchronized for some reason. In this case Share Fields Synchronization should be run manually. To do that run the following script,

For LMS Suite v. 4.6

$rem = Get-REMSite http://rem_url
[Elearningforce.SharePoint.REM.Server.Sources.SharedFields.SharedDataSynchronizer]::RunSyncForce($rem)

For LMS Suite v. 4.7

$rem = Get-LMS365REMSite http://rem_url
[Elearningforce.SharePoint.REM.Server.Sources.SharedFields.SharedDataSynchronizer]::RunSyncForce($rem)

Add Custom Shared Field

In order to view default OTB shared fields run the following command in SharePoint Management Shell:

[Elearningforce.SharePoint.REM.Server.Sources.SharedFields.CourseSharedFieldsManager]::DefaultSharedFields

In order to add more fields that should be populated automatically from a course to course offerings, run the following script:

For LMS Suite v. 4.6

$rem = Get-REMSite http://rem_url
$rem.CoursesInfo.SharedFieldsManager.AddSharedFields("FieldInternalName")
$rem.CoursesInfo.SharedFieldsManager.EnsureManagedMetadataProperties();
[Elearningforce.SharePoint.REM.Server.Sources.SharedFields.SharedDataSynchronizer]::RunSyncForce($rem)
Check-REMCourseSharedFields $rem.ContentWeb.Url

For LMS Suite v. 4.7

$rem = Get-LMS365REMSite http://rem_url
$rem.CoursesInfo.SharedFieldsManager.AddSharedFields("FieldInternalName")
$rem.CoursesInfo.SharedFieldsManager.EnsureManagedMetadataProperties();
[Elearningforce.SharePoint.REM.Server.Sources.SharedFields.SharedDataSynchronizer]::RunSyncForce($rem)
Check-REMCourseSharedFields $rem.ContentWeb.Url

This script creates new field in the offerings list, then creates Crawled and Managed properties and then syncs data.

Supported data types: Text, Integer, DateTime, Taxonomy, Boolean

$rem.CoursesInfo.SharedFieldsManager.AddSharedFields("FieldInternalName")
Be careful with field internal name it should be specified properly!

After you've added the field you should run Full Crawl because every new shared field means there's a new managed metadata property that requires full crawl operation.

NOTE: It is very important to keep shared fields settings as they were during the field creation in Courses list in REM.

For example, changing shared field type from Multi-valued to Single-valued will result in broken synchronization between Courses and Course Offerings lists, and affect Course Catalog workability.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.