Changing The Name of The People Search Scope – Impossible?
Recently I investigated the following: A SharePoint 2010 site collection created with Finnish language pack and the default search scopes (“All Sites” and “People”) defined in the Search Service Application. The site collection has a search center created with Enterprise Search Center template. As the site is in Finnish, the customer would like the search scopes to be in Finnish as well to match the Finnish tabs in the search center UI and the overall Finnish UI experience. Not an unreasonable requirement.
Changing the “All Sites” to something incomprehensibly Finnish (“Kaikki sivustot”) works great. But changing “People” to “Henkilöt” fails big time as the people core results web part on the peopleresults.aspx page gives an error: “Scope in your query does not exist”. This worked just fine in MOSS 2007, so something must have changed in the 2010 release.
In the ULS logs I found indicators the a scoped named “People” was still looked for:
'Search Service Application 1', scope cache: scope 'People' (consumer 'a6769c24-a8d4-4f28-bf60-78ad6cdb7b4d') was not found; refreshing cache and retrying
The first thing was to go through the people core results web part for any setting to define the scope. There is the “location properties” section but bot settings were empty:
Typing the scope name “Henkilöt” in the scope field had no effect.
Next I started to wonder, how does the web part actually fetch the results. Especially when the Location is set to “None”. Using reflector shows that the web part has “DefaultSearchLocation” member which returns “LocalPeopleSearchIndex”. Thanks to Corey Roth, that is the internal name for “Local People Search Results” federated location. Which reminded me of the fact I once had known but since forgotten: SP2010 routes the even the local search queries through the federation layer, using “Local Search Results” and “Local People Search results” federated location.
Setting the ULS “SharePoint Server Search” category logging to verbose confirms the use of the federated location:
The next logical step was to go to settings of that federated location and try to specify the scope there. But there is no such setting:
With the “Henkilöt” scope set in the web part earlier, I went back to my verbose ULS logs to find the following Query category rows:
property 'scope' op 'DBOP_equal value Henkilöt
property 'scope' op 'DBOP_equal value People
So it seems that the People scope is hard-coded somewhere and gets appended to every query, overriding the web part setting. And it was not set in the federated location properties and I had no other clues, so I was forced to give up.
Then I remembered the old rule “if you cannot change it, create a workaround”. The query processor is the only place that requires the existence of the scope named “People”. Everywhere else I can use some other scope, and it has no effect on the query processor as the People scope is hard coded somewhere in the federated location settings. So instead of renaming the People scope, I created a shared copy of the scope (“Make copy as Shared” in Scopes page” and renamed the new scope as “Henkilöt”:
After that I went to site collection search settings and included the “Henkilöt” scope in the scope dropdown and remove the original People scope from the dropdown. Now the end users have only the “Henkilöt” scopes visible, and that scope is identical to the original People scope. The query processor still needs the People scope but it is available in the service application.
As a conclusion, there seems to be two options: the people search is not properly internationalized, or I am missing something obvious here. I hope it is the latter, so please prove me wrong and explain what I did not understand here.
Popularity: 2% [?]