Skip to main content
Skip table of contents

Simplifying Search by Substituting a Short Text String for a Long Text String

In order to save the time and effort of repeatedly searching for long text strings (such as file paths), Discovery Search enables you to dynamically substitute a short text string for a long text string. For example, a very long path name, which is difficult to type in repeatedly for searches, could be replaced by a simple search string, such as VIP-DESKTOP.

Also, in the Discovery Search search field, you can do the same substitution (i.e. type in VIP-DESKTOP and have this be substituted for a longer string).

Instructions

To substitute a long path with a simple search string, we use the PathReplacement.json file in the Discovery Server Configuration folder:

  1. Edit PathReplacement.json using a text editor, such as Notepad++

  2. Change the long path: "C:\Testing\November\Gov Files\National Film Board" to the shorter path: "VIP-DESKTOP"

    CODE
    {
    "C:\\Testing\\November\\Gov Files\\National Film Board": "VIP-DESKTOP"
    }

When using FQDN paths, double slashes are required.

3. Save

4. Restart (Stop and Start) Discovery Server in IIS

Discovery Server search results will show that the path has been changed:

When copying the file to the clipboard, the original path will be displayed.

In the Discovery Search search field, the short text string (for example, VIP-DESKTOP) can be used as a search term.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.