Setting Up Synonym Search

You must set up the synonym search and create a custom thesaurus so that the vault users can find documents using synonyms in the search query. If your thesaurus is large, the synonym search can have a negative effect on the performance of the search.

Note: To use this feature, your search engine must be dtSearch.

To set up the synonym search:

  1. Use a text editor to create your own custom thesaurus file that is similar to this:
    <?xml version="1.0" encoding="UTF-8" ?>
    <dtSearchUserThesaurus>
    	<Item>
    		<Name>Synonyms for announcement</Name>
    		<Synonyms>announcement notice bulletin statement publication</Synonyms>
    	</Item>
    	<Item>
    		<Name>Synonyms for contract</Name>
    		<Synonyms>contract agreement deal arrangement</Synonyms>
    	</Item>
    </dtSearchUserThesaurus>
    

    Each Item contains a synonym group. The Name element contains a description for the synonym group and it has no effect on search. The Synonyms element contains a single synonym group. Separate the synonyms with a space.

  2. Save the file with the name thesaur.xml here:
    C:\Program Files\M-Files\<version>\Server\<language code of the search language>
  3. Open M-Files Admin and go to a vault.
    1. Open M-Files Admin.
    2. In the left-side tree view, expand an M-Files server connection.
    3. Expand Document Vaults.
    4. Expand a vault.
  4. Click Configurations.
  5. In the navigation area, expand Advanced Vault Settings > Configuration > Search.
  6. Click Full-Text Search.
  7. In Thesaurus, enter thesaur.xml.
  8. Click Save.
  9. Close M-Files Admin.
  10. Use Windows Task Manager to restart the MFServer service:
    1. Right-click the taskbar and select Task Manager.
      Result:The Task Manager window is opened.
    2. Open the Services tab.
    3. Right-click the MFServer service and select Restart.
Now when users search for announcement, the search results list documents that contain the words announcement, notice, bulletin, statement, or publication. Synonyms are identified in document contents and metadata.