Share via


Search relevancy Cont...- Explaining Thesaurus

What does it Mean :

Adding Thesaurus or Synonyms is one of the first things to improve search engine intelligence.  This is a mean to explain the search engine to depict a meaning for another word, abbreviation or Notation. Using PowerShell, an administrator can upload a list of Thesaurus to the Search Service application. Please note that , you will have to maintain this particular list of Thesaurus  in future, any additions should be appended to this document and then further should be uploaded again using PowerShell.

The dictionary is always overwritten, it does not append information to it.

Where can you use:

For example , when your users are searching for a business unit, they tend to type the short form of that Business unit , and they expect results with the business unit which they have searched. Thesaurus can be a help here, just import a file (csv) to the Enterprise Search with the Business unit name (short Form) and the complete form, so that Search engine can look for the complete name even though the short form was searched. Another situation can be change of organization name. Lets say , an organization which was called VBU (Vertical Business Unit) is renamed as BVO (Business Vertical Organization), with the fact that all the old document must be referring VBU , when a user /employee search for BVO, he should get results from VBU too. Again Thesaurus will handle this.

How can we do this:

Create a file with extension csv, and have three headers

Key,Synonym,Language

Start adding the keys and synonyms.For above scenarios, it will be

  Key,Synonym,Language
 VBU,Vertical Business Unit, en
 VBU, BVO,en
 BVO, Business Vertical Organization,en
 SP, SharePoint,en
 SP2013, SharePoint 2013, en
 admin, administrator,en

For this Demo, In my Hyper -V , I have had few documents and I searched for "SP" , and I got 4 results as shown. While Searching for SP, I expected results for SharePoint as an user.

Now We import the csv file with Thesaurus to search service application, and now this dictionary is added for the content processing engine to be able to provide us some relevant results.

We run following powerShell Scripts

  Add-PSSnapin "Microsoft.SharePoint.PowerShell"
 #Get service application
 $mySearchServApp = Get-SPEnterpriseSearchServiceApplication
 #import the thesaurus file with data.
 Import-SPEnterpriseSearchThesaurus -SearchApplication $mySearchServApp -FileName \\sp15\SearchRel\Thesaurus\Sample.csv
 Please Note: File Name is in form of UNC path.
 It should complete with success message as shown below.

 And Now We search for same "SP", and we have results which I was expecting.

 

  

 You do not even need a crawl before you can start seeing the effect of added synonyms. Thesaurus are powerful and easy to implement and can make a hugh improvement in user experience.

Cont...