Showing posts with label Synonyms. Show all posts
Showing posts with label Synonyms. Show all posts

Monday, March 14, 2016

Implementing Thesaurus in SharePoint 2013

1. Create a thesaurus file
2. Deploy/Import the Thesaurus file
3. Check the results

1. Create a thesaurus file

- In the Key column, enter the term (single or multiple words) that you want to trigger a synonym for when the term occurs in a query.
- In the Synonym column, enter the synonym (single or multiple words) that you want to add to the query if the term specified in the Key column occurs in a query.
- In the optional Language column, enter the abbreviation for the language for which the synonym should apply.
Example of a thesaurus looks like this:
 Key,Synonym,Language
IE,Internet Explorer
Internet Explorer,IE
UN,United Nations,en
UN,Vereinte Nationen,de

2. Deploy/Import the Thesaurus file

Start the SharePoint 2013 Management Shell.

$searchApp = Get-SPEnterpriseSearchServiceApplication
Import-SPEnterpriseSearchThesaurus -SearchApplication $searchApp -Filename <Path>

<Path> specifies the full UNC path of the .csv file (the thesaurus) to be imported.Universal Naming Convention (UNC) is a way to identify a shared file in a computer without having to specify (or know) the storage device it is on. 

In Windows operating systems, the UNC name format is:

3. Check the results

When you search for "IE" you should get results with "IE" and "Internet Explorer"

SharePoint 2013 Thesaurus or Synonyms

SharePoint 2013 Thesaurus or Synonyms

The Thesaurus feature in SharePoint is associated with the SharePoint Search Service Application. In SharePoint Search if you want to include synonyms also in Search results for specific keywords, you need to import a thesaurus file into SharePoint.

In case you search for IE and you want the Search Results to include IE and Internet explorer, you need to have a thesaurus file uploaded with these entries into SharePoint

Thesaurus file is normally used to specify synonyms for a single word or multiple words that occur in queries. The query is expanded based on the entries in the thesaurus. You create and maintain the thesaurus file in a system external to SharePoint 2013 before you import it into SharePoint 2013 to make the synonyms available to the search system.
It should be a .csv file with the columns Key, Synonym and Language

- In the Key column, enter the term (single or multiple words) that you want to trigger a synonym for when the term occurs in a query.

- In the Synonym column, enter the synonym (single or multiple words) that you want to add to the query if the term specified in the Key column occurs in a query. Synonyms consisting of multiple words will be added as phrases to the query.

- In the optional Language column, enter the abbreviation for the language for which the synonym should apply.If you leave this column empty, the query is expanded with the synonym regardless of the query language.
Note : Make sure there are no leading or trailing spaces around the terms

Example of a thesaurus looks like this :

Key,Synonym,Language
IE,Internet Explorer
Internet Explorer,IE
UN,United Nations,en
Implementing Thesaurus in SharePoint 2013