Posted by & filed under SharePoint.

We’ve been working with Microsoft SharePoint Server (MSS) 2010 for a little while now and trying to plan our strategy going forward. One feature we’re interested in is utilising People Search as a corporate global address-book.

One compelling reason for a multinational company like ours is to use the new phonetic search. An example a phonetical search is someone looking for Geoff Bridges.  A user can type in either Geoff or Jeff Bridges and be presented with the correct user details. Another example search is if you plug in Mike Jones, you will return back either Mike Jones or a Michael Jones.

We’ve noticed that the phonetic search hasn’t been working on our instances at all so a bit of digging around and I’ve come with some interesting facts.

All the phonetics and synonyms of each word are held in a text file, about 25MB in size in the following location;

C:\Program Files\Microsoft Office Servers\14.0\Bin\languageresources.txt

Upon further investigation since all our clients have the English (United Kingdom – LCID 2057) set in the regional settings and the the phonetics dictionary has mostly English (United States – LCID 1033), we got no phonetical search at all. A simple case of changing the browser’s user agent language settings to en-US (1033) gives you a workaround but not necessarily a total solution.

Hope this helps someone out as we were scratching our head for a little while. I’ll update the site again once I have a solution.

Kristof Kowalski // kristof@kowalski.ms

UPDATE 1: I’ve managed to find some more details about the Phonetic and Nickname Search issue. Here is what I have thus far.

  • Phonetic / fuzzy matching on names, i.e. searching for  “Peat” and getting results for Pete  are done via  Speech Server in 2010 People Search.
  • Different results for each different LCID (locale/language ID ) at query time – this is to be expected for both the above new features in People Search. Given that this behaviour is by design.
  • Nickname matches are done via  the MSSLanguageResources table of the Search Service application database. This table is partitioned on LCID for different languages. indicates nickname matches and it is a separate  to phonetic matching.
  • If you look into MSSLanguageResources table of Search Service application database, you can see mappings for the nick-names.
  • What happens in the scenario of searching with the locale as en-US is: we are matching nickname results in en-US  - which mean with search term Mike we return:

Mike Scott (exact match )
Michael Scott (nickname match) – As per the above said table, Pete is  a valid nickname match for peter in the EN US LCID [i.e. 1033]

  • For non English language LCIDs, the above said table does not have nickname entries by design for English names. In other words, there is no nick-name assigned for the LCID 2057 [which is EN-GB].

From all intensive purposes we should be able to add/remove nicknames via the New-spenterprisesearchlanguageresourcephrase cmdlet. In a simple test case we would be able to perform the following commands, my Search Application Id is df4fdf37-0fc3-45ab-b42f-64650e42d1a5;

New-spenterprisesearchlanguageresourcephrase –Name Michael -Language "en-GB" –Type "Nickname" –Mapping Mike -SearchApplication df4fdf37-0fc3-45ab-b42f-64650e42d1a5

New-spenterprisesearchlanguageresourcephrase –Name Mike -Language "en-GB" –Type "Nickname" –Mapping Michael -SearchApplication df4fdf37-0fc3-45ab-b42f-64650e42d1a5

That’s using Mike and Michael as the test users. When I added them to the Search Service Application and then need invoke the “Prepare query suggestions” job, as it only runs once every 24 hours;

Start-SPTimerJob -Identity “Prepare query suggestions”

I still don’t get the nickname matching at all. I can see that the job runs successfully but we don’t get back any results. Strange. To ensure that the new nicknames are added to Search Service Applicaiton DB, I ran the following query;

SELECT * FROM dbo.MSSLanguageResources WHERE Locale like ’2057′

Hmmm… All there. More investigation needed.

UPDATE 2: Have logged a call with Microsoft UK Premier support and this is reproducible, so it looks like it could be a bug. More to come, stay tuned.

UPDATE 3: With the help of Microsoft I’ve now been able to fix the issue. The crux of the problem is, when you install the pre-reuisites it installes the Microsoft Speech Platform Server Runtimes for en-US only. Since nicknames and phonetic search are done by the Speech server we were missing the language files for the localised searches to take place. So the fix is as follows;

You’ll be ready to rock n’ roll after this. From my above example, Mike and Micheal should work now based on the en-GB (2057 LCID). By adding the new language you will still manually have to manually add the nicknames using New-spenterprisesearchlanguageresourcephras, so rather then making up the nicknames on the fly I’ve gone ahead and converted the languageresources.txt to a CSV file and only kept the en-US (1033) nicknames. With this CSV file I can simply read the contents using the Import-CSV command. Here is the csv file as well as the PowerShell commands to import your nicknames for your particular language, remember to get your Search Application Id in my above example prior to running this command;

Download languageresources.zip.
$names = Import-Csv d:\temp\languageresources.csv
foreach ($line in $names) {
New-spenterprisesearchlanguageresourcephrase –Name $($line.name) -Language "en-GB" –Type "Nickname" –Mapping $($line.nickname) -SearchApplication df4fdf37-0fc3-45ab-b42f-64650e42d1a5
}

Then run;

Start-SPTimerJob -Identity "Prepare query suggestions"

Finally, check that the timer job has run successfully;

(Get-SPTimerJob -Identity "Prepare query suggestions").HistoryEntries | Format-Table -Property Status,StartTime,EndTime,ErrorMessage

Enjoy peeps, it’s been emoitional!
Kristof Kowalski / kristof@kowalski.ms

9 Responses to “SharePoint Server 2010 Phonetic and Nickname Search”

    • NickName

      it has no effect on the languageresources.txt file after installing Speech Server language runtimes for Gb,Can you please advice whats may be wrong?

      Reply
  1. Nick Larter

    Excellent post Kristof. I would’ve been chasing my tail for days trying to work this one out. Thanks for contributing to the community.

    Reply

Trackbacks/Pingbacks

  1.  Disable Nickname Search in SharePoint 2010 Enterprise Search « Satheesh's SharePoint Blog
  2.  SharePoint Server 2010 Phonetic and Nickname Search | Kristof Kowalski « Murratore’s Weblog
  3.  Sharepoint 2010 a grasp of the platform « renekaterberg
  4.  Sharepoint 2010 a grasp of the platform « Sharepoint Noob

Leave a Reply

  • (will not be published)