My Sites, Magic, and Randomness

Despite constant assertions by my mother to the contrary, computers don't behave randomly, nor are they boxes filled with magic. Even the output of a non-deterministic function can only be thought of conceptually as "random" while we don't understand its internal operation. Case in point - SharePoint 2007 and the case of the Randomly Assigned My Site Preferred Search Center URL.

SharePoint 2007 My Site Preferred Search Center Management

Countless postings and random musings describe the value here as appearing at random. Whither thou goest, blank value?

Well, as it turns out, when an SSP is initially provisioned, this value is left blank. This has the effect of causing all subsequently provisioned My Site instances to lack a connection to a search center, limiting the search experience while on their My Site to just their individual site (the OOB OSSSearchResults.aspx and the This Site scope). When this value is set to something, everyone's My Site is updated to use custom scopes and direct queries to the configured search center. Sometimes though, no one touches this setting and yet it magically gets configured for a search center... and people are left wondering a breathless why?

Well, as it turns out no magic is involved, nor is it the random behavior of a malfunctioning system. Whenever a search center is provisioned, a hidden feature called the OSSSearchSearchCenterUrlFeature is activated. This feature consists of a feature receiver that checks to see if the Preferred Search Center setting of the My Site infrastructure associated with the current Web Applications SSP is configured, and if not, sets it to be the URL of the search center being provisioned.

Tada; magic explained. You didn't have this value configured, and you probably meant to configure it, so we'll configure it for you first chance that we get. The first time you provison a site collection using the Search Center template, we'll set this value for you.

Now, by what foul magic or chance coalescence is the Preferred Search Center URL setting propagated down to existing My Site instances? Brownie points to the first commentor to answer correctly...