Short message search (Advanced Access)
With advanced text search syntax, you can perform searches per message from the Documents tab. This workflow utilizes the workspace’s Elasticsearch short message index to allow the user to search specific metadata on a per-message level.
For more information on the short message search index and saved searches:
Considerations
Before you run a short message search, consider the following:
- Only fields of type Long Text are available in the current Advanced Access (AA) release.
- Message-level conditions:
- are treated as an index search condition.
- cannot be combined with other index search conditions.
- can only be searched with other field conditions using the AND operator.
- can only be used as the first condition within a search. From here, you can run your search, and it will return RSMF documents matching the supplied search criteria.
Creating a short message search
To create a search using the short message search workflow:
- Navigate to the Documents tab.
- Click the +Condition button in the search panel to add a condition.
- Select (Short Message Search) from the list of fields.
A dialog opens where you can choose from each short message metadata field. Similar to how you would add conditions to any Documents tab search. - Click the + Condition button to add a new message-level condition.
- Select the desired short message field from the list.
Note: Only fields of type Long Text are available in the current AA release.
- On the Filter dialog, do the following, then click Apply to save the settings.
- Operator—choose your operator.
- Query text box—type in the text to query.
- Optionally, you can:
- Add additional conditions by clicking +Condition and repeating Steps 4-6.
- Create logic groups to group conditions together by clicking the drop-down arrow next to +Condition and selecting Logic Group. Then, drag and drop the conditions into the logic group frames. Use the AND or OR operator to join logic groups.
- When finished entering search conditions, click Apply on the Short Message Search Conditions dialog.
The condition card is added to the Short Message Search Conditions list.
- Repeat Steps 2-8 to add more conditions or logic groups.
- Click Run Search to start the search if the Auto Run toggle is not enabled.
Defining search criteria
There are five field types in short message search conditions:
Note: Only fields of type Long Text are available in the current AA release.
Each field type works similarly to the standard Relativity field type of the same name. The exceptions are long text fields and True/False fields. In short message search conditions, long text fields are searched in a manner similar to dtSearch using the advanced text search syntax, while True/False fields are most similar to Yes/No but with the values of True and False instead.
Long text
Searching Long Text in Short Message search conditions is done by entering text queries using the advanced text search syntax. The advanced text search syntax is a domain-specific language for searching Elasticsearch indexes using syntax similar to that of dtSearch.
Note: Not all dtSearch syntax is supported and there are some differences between how the advanced text search syntax and dtSearch behave.
The table below shows search string examples and their expected results.
Search string | Returns RSMF documents with messages containing… |
---|---|
"apple pear" | The exact phrase apple pear. |
apple AND pear | The words apple and pear. |
apple OR pear | Either apple or pear. |
apple W/5 pear | The word apple within five words of pear. The opposite is also true. |
apple PRE/5 pear | The word apple within five words before pear. The opposite is not true. |
apple AND NOT (pear) | The word apple but not the word pear. |
pear* | Any word beginning with pear, including the word itself. For example, pears and Pearson. |
pe?r |
Any word beginning with pe with a single character between that and r. For example. pear or peer. |
Reserved characters and words
Much like in dtSearch, there are characters and words that are reserved by the advanced text search syntax and must be treated differently to be searched.
- Reserved characters: " ( ) % * ? ~ ! / \ + - & | { } [ ] ^ : < >
- Reserved words: AND, OR, NOT, W/N, PRE/N (where "N" is a number)
In the advanced text search syntax, reserved characters may be searched by inserting a backslash (\) before them in the query.
- For example, to search for The cat is in the hat!, you would enter The cat is in the hat\!.
- This may also be used to search for the literal phrase The query should be W/5, which you would enter as The query should be W\/5.
Reserved words may be searched by using quotation marks around them, either individually or as part of a phrase.
- In the query "Bob and Jill went to the market", the AND would automatically be searched because, logically, the AND operator cannot be used within a phrase
- If you needed to search for the word AND separately, you must enter the query like the example as: bob OR "and" AND jill
New syntax rules
As noted above, there are differences between how dtSearch and the advanced text search syntax behave with certain queries. The advanced text search syntax has several different requirements for certain queries to be valid. These are detailed below.
- All phrases must be contained within quotation marks or a syntax error results.
- Any query containing multiple Boolean clauses must have each clause contained within parenthesis to ensure that the intended meaning of the query is clear.
- Valid: (apple AND pear) OR (dog AND cat)
- Invalid: apple AND pear OR dog AND cat
- The NOT operator must be followed by parenthesis containing what should be searched with the NOT operator to ensure that what the NOT operator is acting on is clear.
- Valid: apple AND NOT (pear)
- Invalid: apple AND NOT pear
Proximity operator (W/N, PRE/N) limitations
Compared with dtSearch, there are a few limitations on how you can use the two proximity operators.
- AND cannot be used in proximity.
- Example invalid query: (cat AND dog) W/7 bird
- Proximity operators cannot be nested.
- Example invalid query: (cat W/3 cat) W/5 bird
- There is no NOT W/N or NOT PRE/N functionality.
- Example invalid query: cat NOT W/5 dog
Word breaking and wildcard (*, ?) behavior
Relativity’s short message search indexing uses Elasticsearch’s standard analyzer. For more information on Elasticsearch's standard analyzer, see Elasticsearch's documentation.
Elasticsearch's documentation describes how words are broken into tokens, or individually searchable pieces of text, during indexing. The analyzer cannot be configured in any way at this time.
The most practical impact of this behavior on searching is that combining wildcard operators and special characters may not lead to expected search results.
- For example, “fixed-* text” is searched as “fixed * text.” This means that it will not match “fixed-length text”, because in this case, the hyphen character is used as a word separator rather than a punctuation mark.
We plan to make the Elasticsearch analyzer behavior more transparent in the future to better communicate to customers what their query is ultimately searching for.
Fixed-length text
This field type is not part of the current AA release.
Date
This field type is not part of the current AA release.
Whole number
This field type is not part of the current AA release.
True/False
This field type is not part of the current AA release.