sakaiproject/nakamura — pull request #719 by raydavis (2012-04-06 22:59:47+00:00)
Title: KERN-2713 Improve user profile index handler

Here's the description from https://jira.sakaiproject.org/browse/KERN-2713 :

1. When a new user account is created, ProfileIndexingHandler walks down the "authprofile" tree unnecessarily, issuing pointless updates and possibly overlapping with actual creation of Profile tree items. At best, this is noise; at worst, it can trigger contention bugs such as the one described at SPARSE-178.

2. Because the Basic profile fields are handled by the AuthorizableIndexingHandler, the ProfileIndexingHandler skips indexing the path "a:USER_ID/public/authprofile/basic". However, it does not skip paths like "a:stuc/public/authprofile/basic/elements" and "a:stuc/public/authprofile/basic/elements/lastName". In my tests, this results in multiple Solr index updates of the form:

id = "a:stuc/public/authprofile/basic", profile values = ["unknown", "unknown", "unknown"]

3. When one element of a profile section is deleted, the handler's getDeleteQueries method deletes the entire section's search record. Instead, the section should be walked and re-indexed to include only the remaining elements.