Writing an Advanced Search String
Go Up to Using the Advanced Search of ER Objects
Search strings in ER/Studio Team Server:
- Are not case-sensitive. For example, you get the same results when you search for good, Good or gOOd.
- Support quoting text to match exact phrases. For example, "good idea" matches good idea, but not idea good or good or bad idea.
- Support logic operators: OR, AND.
- Support making mandatory or excluding words.
- Support wildcard characters: *, ?.
- Support the similarity and proximity character: ~.
To use special characters as normal characters, such as using * as an asterisk and not as a wildcard character, see Escaping Special Characters.
Contents
Using Logic Operators
You can use OR or AND in your search strings:
- OR matches if there is a match for any of the expressions at each side of the OR keyword. For example, searching for good OR idea returns the combination of the results of searching for good and the results of searching for idea: good, idea, good idea.
- AND matches if there is a match for both expressions at each side of the AND keyword. For example, searching for good AND idea returns only the results that are among both the results of searching for good and the results of searching for idea: good idea, but not good or idea.
Making Mandatory or Excluding Words
By default, a match for a word is optional. The + and - symbols, used at the beginning of a word, change that:
- + makes the word mandatory. For example, +apples oranges matches apples and oranges, apples, but not oranges.
- - excludes the word. For example, -apples oranges matches oranges, but not apples or apples and oranges.
Using Wildcard Characters
When searching ER/Studio Team Server, you can use the asterisk (*) and the question mark (?) wildcard characters. This is how they work:
- * represents 0 or more characters. For example, t*s matches tsunami, test or this.
- ? represents a single character. For example, a?h matches agh or athletic, but not ah or argh.
- Note: The first character in a search string cannot be a wilcard character.
Using the Similarity and Proximity Character
Using ~ at the end of a word matches similar words as well. For example, land~ matches land, sand and band.
Using ~ at the end of a quoted string, followed by a positive integer, matches results where the words within the string are within the specified number of words of each other. For example, "diagram update"~10 matches ER objects where diagram and update appear within 10 words of each other.
Escaping Special Characters
ER/Studio Team Server search features are powered by Apache Solr. There are some special characters that you must escape within a search string to use them as normal characters: + - && || ! ( ) { } [ ] ^ " ~ * ? : \.
To use a special character as a normal character in a search string, you must escape the special character. To escape a special character, write a backslash (\) before the wildcard character in the search string. For example, searching for ABC\*DEF\?GHI matches the literal term ABC*DEF?GHI.