Searching for symbols
This topic describes how to make symbols searchable in a dtSearch index and how to use regular expressions to search for certain symbols reserved as search operators, such as the % sign.
Searching for symbols
To search for symbols, perform the following steps:
- Create a dtSearch index.
- Update the alphabet file to include the % sign as an indexed character:
- Enter the following under [Letters] // Original letter, lower case, upper case, unaccented:
- Delete the % sign from the [Ignore] section. Take care not to remove the gray boxes, which represent non-printable characters. Removing them may break the index.
Before:
After:
- Repeat these steps for any other symbols that you need to make indexed. Delete the appropriate symbols from the [Spaces], [Ignore], or [Hyphens] sections. Please note, if you edit the hyphen, space, or ignore section, you will need to also keep the leading space. Removal of leading spaces will cause errors in Relativity.
- Perform a full build of the dtSearch index.
You can now search for terms containing the % sign using a regular expression. For example, if you need to search for documents that contain the term 75%, you would enter the following in your search box (ensuring you select the proper dtSearch index):
"##75\u0025"
To break this regular expression down:
- ## signals to Relativity to treat the string as a regular expression
- \u indicates a search using a character's Unicode value (to follow in the next four characters)
- 0025 indicates the hexadecimal Unicode value for the % sign.
Note: For most symbols, once you have indexed the character in the alphabet file, you can type them directly into the dtSearch box without using regular expressions. Thus to search for 30!, enter 30! into the dtSearch box after you have made ! an indexed character. You only need to employ RegEx for certain symbols.
For characters outside of the ASCII code range, such as § and £, you cannot make them searchable by adding them to the letters section. Instead, create an AdditionalLetters section at the bottom of the alphabet file and insert the characters' Unicode value.
Searching for emojis
Relativity supports searching for emojis with dtSearch indexes. Before searching for emojis, you must update the Alphabet list, then rebuild the search index. Follow the steps below the image to update the Alphabet list and run emoji searches.
Note: Emoji search works with file formats that store emojis as Unicode characters, such as Word documents and emails. File formats that store emojis in other formats, such as storing the emoji name, are currently not supported. Some examples include messages from Slack and Teams.
To update the Alphabet list with the emoji character string:
- Navigate to the Search Indexes page for your workspace.
- Create a new dtSearch index or edit an existing dtSearch index. For information on creating a new dtSearch index, see Creating a dtSearch index.
- Navigate to the Alphabet tab located in the Advanced Settings section.
- Scroll to the end of the Alphabet list until you see the [End] tag. Add the following string under any existing strings:TokenCharRanges32 = 1f000-1f0ff 1f300-1f6ff 1f700-1f77f 1f900-1f9ff
- Click Save.
- From the dtSearch Index panel on the right side of your screen, click Build Full Index.
- Click Yes on the confirmation message.
- When the build completes, navigate to the Documents tab.
To run emoji searches:
Symbol searching quick reference
Use the following table to quickly reference how to search for special characters. Note that you can search for the ampersand symbol without using RegEx with an escape character.
Symbols | Directions | Example search term | Example search string |
---|---|---|---|
$ & @ \ / + , . ; - ' ` ! < > { } ^ _ { } | | Update the alphabet file and search. |
|
|
? * ( ) # = | Update the alphabet file and use RegEx with an escape character (\). |
|
|
" % : ~ |
Update the alphabet file and use RegEx with the hexadecimal Unicode value. |
|
|
Characters outside the ASCII code range such as § and £ | Create an AdditionalLetters section at the bottom of the alphabet file and insert the character's Unicode value. |
|
|