Running a dtSearch
Use dtSearch to complete stemming, fuzzy, and proximity searches on the information included in your dtSearch index.
Considerations
Consider the following before running a dtSearch.
- Pressing Enter between search terms in the Search Terms text box acts as spaces between terms and not as the AND or OR operator. Terms will not be searched for independently. They will be searched for as one search item.
- Use AND or OR operators to search for terms independently.
- For example, typing apples, pressing Enter, and typing pears searches for apples pears as one search item. However, typing apples OR pears searches for instances of the word apples or pears individually.
- dtSearch indexes are case insensitive by default.
- All characters in a dtSearch index are normalized to lowercase.
- For example, if your exact phrase search is an acronym like ACT, you must build a case-sensitive dtSearch index.
- The maximum number of search terms is 65,000 characters.
- We recommend avoiding wildcards in your search terms.
- Wildcards can slow searches.
- Wildcards can return more documents than intended.
- Leading wildcards should not be used. For example *ing.
- We recommend limiting proximity operators.
- Large numbers of proximity operators within a single query can cause slower performance. For example, w/ or PRE/).
- Nesting proximity operators can also cause performance problems. For example, dog w/5 (cat w/2 bird),
- Queries can be difficult to read and understand.
- We recommend running multiple queries that return small numbers of documents.
- We recommend writing specific search terms.
- Avoid using one broad query.
Running a dtSearch in the search panel
To run a dtSearch in the Search panel from the Documents list in Relativity:
- Navigate to the search panel.
- Click Add Condition.
- Select (Index Search) from the Add Condition drop-down list.
The (Index Search) modal opens.

- Select the name of your dtSearch index from the Index drop-down list.
- Enter terms for the search in the Search Terms box. See examples of search strings and their results in the table below.
Note: Refer to
Considerations for more information on search terms entries.
- Optional fields to set:
- Fuzziness Level—access fuzziness for key terms by selecting the desired level from the list.
- Enable Stemming—access stemming for key terms by selecting the box.
- Sort by Rank—click the box to sort the results in order of the most relevance to your search terms. The most relevant documents are listed at the top of the results set, with the least relevant documents, or the documents with the smallest number of keywords, is at the end of the list.
- If needed, repeat the above steps to add any additional search conditions.
- Click Apply.
The search terms populate in the Search builder.
- Click Run Search. To stop a long running search, click Cancel.
Running a dtSearch in the Search Browser
To run a dtSearch in the Search browser:
- Click
to access the Search browser from the Documents List.
- Click Create New Search.
- Enter required fields in the Information card.
- Click Add Condition.
- Select (Index Search) from the Add Condition drop-down list.
The (Index Search) modal opens.

- Select the name of your dtSearch index from the Index drop-down list.
- Enter terms for the search in the Search Terms box. See examples of search strings and their results in the table below.
Note: Refer to
Considerations for more information on search terms entries.
- Optional fields to set:
- Fuzziness Level—access fuzziness for key terms by selecting the desired level from the list.
- Enable Stemming—access stemming for key terms by selecting the box.
- Sort by Rank—click the box to sort the results in order of the most relevance to your search terms. The most relevant documents are listed at the top of the results set, with the least relevant documents, or the documents with the smallest number of keywords, is at the end of the list.
- If needed, repeat the above steps to add any additional search conditions.
- Click Apply.
The search terms populate in the Search builder.
- Click Save or Save As.
- Select the name of the dtSearch in the Search Browser.
- Click Run Search. To stop a long running search, click Cancel.
Search string examples and expected results
The following table shows search string examples and their expected results. For more information, see Using dtSearch syntax options.
Search String |
Returns Documents With... |
apple pear |
The exact phrase apple pear |
"apple pear" |
The exact phrase apple pear |
apple AND pear |
The word apple and the word pear |
(apple and pear) AndAny (grape or banana) |
Any document that contains apple and pear, with grape and banana also being counted as hits. Grape and banana aren't evaluated as conditions. They're simply added to the search results as optional terms to be highlighted if they appear in the document. |
apple OR pear |
Either apple or pear |
apple W/5 pear |
Apple appears within 5 words of pear |
apple PRE/5 pear |
Apple appears within 5 words before pear Note: Relativity does not use the POST operator. However, you can mimic this functionality by reversing the order of the terms, and using the PRE operator. |
apple NOT W/5 pear |
Apple does not appear within 5 words of pear |
apple AND NOT pear |
Apple appears but pear does not. |
apple W/5 xfirstword |
Apple appears in the first 6 words of the document. |
apple w/5 xlastword |
Apple appears in the last 6 words of the document. |
Searching for words longer than 32 characters
When a word has more than 32 characters (none of which are whitespace, characters in the CJKRanges section, or symbols configured as spaces), dtSearch truncates the word and only indexes on the first 32 characters for a match. As a result, if you search for a term with 33 or more characters, dtSearch will match any document containing a word that begins with the first 32 characters of the search term. If there isn't a match for those characters, nothing will be returned.
For example, if you search for this 35-character word, “ToBeOrNotToBeThatIsTheQuestionToAsk,” dtSearch will search on the first 32 characters, ToBeOrNotToBeThatIsTheQuestionTo, and return words that starts with those letters. The search results will include these if they are present in the searched documents:
- ToBeOrNotToBeThatIsTheQuestionTo
- ToBeOrNotToBeThatIsTheQuestionToA
- ToBeOrNotToBeThatIsTheQuestionToAs
- ToBeOrNotToBeThatIsTheQuestionToAsk
See below examples for additional references using a humorous word from the movie, "Mary Poppins": Supercalifragilisticexpialidocious.
Search |
Length (in characters) |
Returned results |
supercalifragilisticexpialido |
29 |
supercalifragilisticexpialido |
supercalifragilisticexpialidoc |
30 |
supercalifragilisticexpialidoc |
supercalifragilisticexpialidoci |
31 |
supercalifragilisticexpialidoci |
supercalifragilisticexpialidocio |
32 |
supercalifragilisticexpialidocio
supercalifragilisticexpialidociou
supercalifragilisticexpialidocious
|
supercalifragilisticexpialidociou |
33 |
supercalifragilisticexpialidocio
supercalifragilisticexpialidociou
supercalifragilisticexpialidocious
|
supercalifragilisticexpialidocious |
34 |
supercalifragilisticexpialidocio
supercalifragilisticexpialidociou
supercalifragilisticexpialidocious
|
Notes:
- If you include a wildcard (*) after the 32nd character, you will get the exact same results as if you omitted the wildcard.
- You can use the following regular expression to search your dictionary for all 32-character words: ##.{32}