Finding the SharePoint 2007 / 2010 Thesaurus Files
If you go to TechNet to find out where the thesaurus files for search are so that you can add in your own synonyms, you may be as confused as I was earlier today. It only took me about 20 minutes to figure out, but if three or four people find this post, we’ll have saved enough time for lunch.
The TechNet article you want is Manage thesaurus files (SharePoint Server 2010), though the one for SharePoint 2007 (Edit a thesaurus file (Office SharePoint Server)) is pretty much identical.
In the article, it says
By default, SharePoint Server 2010 installs the thesaurus files for all supported languages at
%ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Config
. When a search administrator creates a Search service application, the search system automatically copies the thesaurus files from the installation location (including any thesaurus files there that an administrator has edited) to%ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Applications\GUID-query-0\Config
, where GUID is the GUID of the new Search service application. The search system performs the same operation on every query server that is running the new Search service application. Thus there is a copy of each thesaurus file on each query server that is running that Search service application.
When I looked in %ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Config
, well, there was no %ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Config
. Instead, because my client had decided to change the location of the index to another drive, I have to figure out where that actually was. Here’s the trick.
In complex farms, you may have multiple Search Service Application, multiple indices, etc. but these steps should work in most cases.
- In Central Administration, go to the Search Application -> Central Administration/ Manage service applications / Search Service Application (or whatever you called it)
- At the bottom of the page, you’ll see a section called ‘Search Application Topology’
- Click the Modify button and on the next screen look for the ‘Index Partition’ (you may have more than one)
- Click on the ‘Query Component 0’ link and Edit Properties
- The field called ‘Location of Index’ contains the root location for the thesaurus files
Looking in that folder, you should find folders that look something like this:
As noted above, the thesaurus files you want to work with are in the GUID-query-0\Config
folder. In my case above, it’s E:\Data\SearchIndex\Office Server\Applications\0f78bae4-05b9-417f-b533-43326409dfcc-query-0\Config
Happy equivalency!
One side note: it boggles my mind that there is no UI to manage synonyms in the thesaurus, but there you go.