Profile index updates
If you wish to trigger a modification or deletion of a profile item from the index, you can do this by using the Sitecore IndexCustodian. For example:
var index = ContentSearchManager.GetIndex("commerce_userprofiles_index_master"); var profileKey = new CommerceProfileIndexableUniqueId( "UserObject", "{E1A906DA-88F2-412B-BCF3-0321EF531A0F}"); IndexCustodian.UpdateItem(index, profileKey); IndexCustodian.DeleteVersion(index, profileKey);
The GUID in this example represents the Commerce profile ID.