Tuesday, September 1, 2009

SharePoint thesaurus files explained

Thesaurus files are used to tailor the search requests to serve a better search results to the end users. We can define multiple synonyms and patterns in thesaurus files

Where to Find the thesaurus files in my Web front end ?
C:\Program Files\Microsoft Office Servers\12.0\Data\Office Server\Applications\GUID\Config

Find TSneu.xml and open it in a editor, this is the language neutral thesaurus files which affects across the site. This file is commented out as an OOTB setting, uncomment this file before proceeding.

insert the following snippet in that file

<replacement>
<pat> laptop </pat>
<pat> notebook </pat>
<sub> Dell </sub>
</replacement>



This configuration explains that if a user searches with string "laptop" or "notebook" those strings were considered as "Dell" before triggering a search.

Restart the Office search service to apply thesaurus changes to the server.
NOTE: NO need for an IISReset or Crawling the content or Index reset just restart the search service

net stop OSearch
net start OSearch

when you search for "Dell" that will be highlighted(technically it is HitHighlightSummary) in the Search description text



When the search string is replaced/handled by a thesaurus in between(in our case it is laptop/notebook) then you cannot see any text as highlighted in its description

No comments: