Add Synonym Thesaurus Entries to SharePoint Search

Trying to get the user community to “buy-in” to the search capabilities of SharePoint?  The use of thesaurus files
in SharePoint can help with the search experience.

Problem: Jobtitle is a user profile property synced up to Active Directory and it contains a
pre-defined formal list of values.  (Eg.  Vice President, Executive Vice President, Regional Vice President, etc.)
When a SharePoint end-user is in People Search and types in ‘VP’ as a search term, they expect the returned results will include results for ‘Vice President’, ‘Executive Vice President’, ‘Regional Vice President’ and ‘VP’.

Solution: Use something called ‘expansion sets’ in a thesaurus file.  These can be added to accommodate the typical search term synonyms familiar to users.  A search term that includes any of the phrases in the expansion set returns search results for any term in the set.

Technet link – http://technet.microsoft.com/en-us/library/dd361734.aspx#section3

Steps taken:
1.  Go to this default location on your app server to find the thesaurus file:
– %ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Config
2. Edit both the language-neutral thesaurus file (tsneu.xml) and the language-specific thesaurus file (tsenu.xml-English United States in my case) to include the following entries for the above example:

<XML ID=”Microsoft Search Thesaurus”>
<thesaurus xmlns=”x-schema:tsSchema.xml”>
<diacritics_sensitive>0</diacritics_sensitive>
<expansion>
<sub>VP</sub>
<sub>Vice President</sub>
<sub>Executive Vice President</sub>
<sub>Regional Vice President</sub>
</expansion>
</thesaurus>
</XML>

Assuming you already have a search service application configured in your farm:

3. Copy editted files to each crawl component config folder on the app server
– %ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Applications\GUID\Config
– %ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Config\Applications\GUID\Config

4. Copy editted files to each query component config folder on each webserver:
– %ProgramFiles%\Microsoft Office Servers\14.0\Data\Config
– %ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Config
– %ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Applications\GUID\Config

5.  Basically, it must be copied into the config folders for all existing search service application guids.
If you create a new search service application after you’ve updated the thesaurus files at
%ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Config,the files will be automatically
propogated to the new search service application.

6. Restart the SharePoint Server Search 14 service on all app and web servers.

Note:   No crawl is required to see the effect. (assuming at least a full crawl has been previously done on the content).  If you’ve copied the file to all the appropriate places, the change is immediate.

Simple change, but effective.

Advertisements

2 thoughts on “Add Synonym Thesaurus Entries to SharePoint Search

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s