Strange search results for deleted Profiles
May 31, 2011 Leave a comment
When deleting a person from Connections (as opposed to ‘inactivating’ them) the search index for Profiles does not remove the entry for the deleted person. Most of the time this doesn’t present a big issue as ideally you will be ‘inactivating’ people rather than deleting them, but there will always be occasions when you do need to actually delete someone’s profile.
Below is an example of how this issue manifests itself:
I have a user I would like to delete called Test User4 (imaginative, I know) so in the profiles_tdi.properties file I change sync_delete_or_inactivate from inactivate to delete and then add Test User4 to delete_or_inactivate_employees.in file (N.B. It is important to remember to change sync_delete_or_inactivate back to inactivate so when the scheduled sync_all_dns.sh script runs it does not delete all the inactive profiles). I then run delete_or_inactivate_employees.sh , which deletes Test User4′s profile.
The problem occurs when I search for Test User4, the search result returns a list (fig. 1) showing the profile as inactive when in fact it shouldn’t show up at all in the search results as the profile has been deleted and when I click on the link I get an error “Profile Not Available” (fig. 2).
This issue was raised with IBM and they confirmed that the only way to correct/purge the search index is by deleting it and recreating it (“Purging content from the index”). With version 3.0.x you can delete an application index without having to stop the Search application by using the deleteFeatureIndex command.
So, using wsadmin I run the following commands which removes Test User4 from the search index:
execfile(“/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/bin_lc_admin/searchAdmin.py”)
SearchService.deleteFeatureIndex(“profiles”)
The index will be rebuilt automatically when the indexing task runs (default 15 minutes) or it can be run manually to rebuild the index straight away (which I would recommend).
SearchService.indexNowWithOptimization(“profiles”)
The rebuild of the index will take some time depending on the size of your Profiles database so make sure it is done outside of core working hours to avoid end-user impact.

