Finding the SharePoint 2010 Thesaurus File using Process Monitor

Image

March 1, 2023

I had a scenario where I needed to update the Thesaurus file for a SharePoint Server 2010 install. From what I could tell from the TechNet article on Managing thesaurus files, the file (tsenu.xml English, United States) should be located in the following directory:

%ProgramFiles%\Microsoft Office Servers\14.0\Data\Applications\<GUID>\Config\

The GUID is supposed to match the GUID of the Search Service Application. However, when I went into the Applications directory, I saw multiple GUID-based folders.

Attempt 1

I went to Central Administration, but I wasn't seeing a matching GUID when looking at the URLs on the service applications.

Attempt 2

In a SharePoint Management Shell, I tried running Get-SPServiceApplication, however, the GUID for the Search Service Application didn't match any of the folders either.

Attempt 3

In the SharePoint Management Shell, I also tried running Get-SPEnterpriseSearchService, however no luck on the GUIDs there either.

Resolution Using Process Monitor

I finally decided to brute force the answer. Here are the steps I took to figure out which file SharePoint was looking at:

  1. I downloaded and extracted the free Process Monitor utility from Microsoft.
  2. I opened the Search Center for a Site Collection.
  3. In Process Monitor, I configured it to only watch for file system activity and started logging the activity.
  4. I then performed a search in the Search Center.
  5. After the search was completed, I stopped Process Monitor.
  6. I then saved the log of the file system activity to a CVS file.
  7. From within Excel, I filtered the Path column to only look for entries that contained the text “tsenu.xml”.
  8. I only came up with a single path that matched.
  9. I modified the file, entering an example expansion set (see TechNet article).
  10. I then restarted the SharePoint Server Search 14 Windows Service.
  11. After the service had restarted, I went back to the Search Center, and was able to successfully search for results based on the expansion set I had put in the thesaurus file.