Using efficient search syntax

Search syntax differs depending on what type of search you are using:

If quick search is enabled, you can use operators such as AND in the search field, but wildcard characters such as * and ? are not needed. For details, see Operators and wildcard characters in quick search below.

Note: If suggestions are not displayed as you type search text into the Search field, quick search is not enabled. An administrator can enable quick search. For steps to search, see Searching for objects: Quick search.
For a regular search, you can use wildcard characters, such as an asterisk (*) or a question mark (?), to represent one or more characters when you are typing search terms. For details, see Wildcard characters in regular search.
If you are searching in a view filter, you can use operators and wildcard characters. For details, see Operators and wildcard characters in searches in view filters. For steps to create view filters, see Applying a filter to a report instance: View filters and Filtering data based on business attributes.

Operators and wildcard characters in quick search

If quick search is enabled, you can use operators to combine terms and phrases.

A term is a single word, such as sales or analysis.
A phrase is a group of words surrounded by double quotes, such as "sales analysis".

You can use the following operators in quick search:

* Operators must be typed in all capital letters such as AND, not and or And.
OR: The default operator, used if terms are not separated by an operator. OR links terms and finds a matching object if any of the terms exist.

For example, to search for objects that contain either the term SALES or the term REVENUE, type either sales revenue or sales OR revenue in the Search field.
AND: Finds objects where both terms exist anywhere in the object's name.

For example, to search for objects that contain both SALES and REVENUE, type sales AND revenue in the Search field.
+ (the plus sign): Requires that the term exists in the object's name. The required term must be typed after the +.

For example, to search for objects that contain SALES and could also contain REVENUE, type +sales revenue in the Search field.
NOT: Excludes objects that contain the term in the object's name.  The search must contain a term to search for, as well as the term to exclude.

For example, to search for objects that contain SALES but not REVENUE, type sales NOT revenue in the Search field.
- (the minus sign): Excludes objects that contain the term in the object's name. The search can use only the excluded term, unlike a search using the NOT operator.

For example, to search for objects that do not contain REVENUE, type -revenue in the Search field.

If you need to search for a special character, such as + or -, type a backslash (\) before the character. This indicates that the character is part of the search, not used as operator. For example, to search for RATING +A -A REPORT, type rating \+A \-A report.

Wildcard characters such as the asterisk (*) or question mark (?) are not needed when quick search is enabled. If quick search is disabled, you can use wildcard characters, as described in Operators and wildcard characters in regular search below.

Wildcard characters in regular search

You can use wildcard characters, such as an asterisk (*) or a question mark (?), to represent one or more characters when you are typing search terms. Wildcard characters are often used in place of one or more characters when you do not know what the actual character is or you do not want to type the entire name.

Use the asterisk (*) to substitute for one or more characters. For example, sales* locates all words that contain the word sales. The location of the asterisk is important: sales* might bring back salesman or sales tax, but it would not find dollar sales. To locate dollar sales, you could type * sales.
Use the question mark (?) to replace one character. For example, if you type sal?, this would find words like sale or sal2, but not sales, since there are two extra characters in that term and the question mark only replaces one of them.

Operators and wildcard characters in searches in view filters

You can use wildcard characters, such as an asterisk (*) or a question mark (?), to represent one or more characters when you are typing search terms. Wildcard characters are often used in place of one or more characters when you do not know what the actual character is or you do not want to type the entire name.

Use the asterisk (*) to substitute for one or more characters. For example, sales* locates all words that contain the word sales. The location of the asterisk is important: sales* might bring back salesman, or sales tax, but it would not find dollar sales. To locate dollar sales, you could type * sales.
Use the question mark (?) to replace one character. For example, if you type sal?, this would find words like sale, or sal2, but not sales, since there are two extra characters in that term and the question mark only replaces one of them.

Examples of correct and efficient search syntax in view filters

The following examples assume that the attribute Name has two display (browse) forms: First and Last. First refers to the first name and Last refers to the last name.

Search keywords that do not include wildcards have wildcards added at the beginning and the end.
User Input: aaa
Filter: First Name like "*aaa*" or Last Name like "*aaa*"
Any text that is included inside of double quotes is treated as a literal comparison. For example:
User Input: "aaa"
Filter: First Name = "aaa" or Last Name = "aaa"
If you include wildcards, then MicroStrategy Web does not add any. For example:
User Input: aaa*
Filter: First Name like "aaa" or Last Name like "aaa"
User input: a*aa
Filter: First Name like "a*aa" or Last Name like "a*aa"
A blank space, a comma, or the word OR indicates a logical OR between two conditions. An OR is placed in between multiple forms.
User Input: aaa* *bbb User Input: aaa*,*bbb User Input: aaa* OR *bbb
Filter: (First Name like "aaa*" or Last Name like "aaa*") OR (First Name like "*bbb" or Last Name like "*bbb")
An ampersand symbol (&) or the word AND indicates a logical AND between two conditions. An OR is placed between multiple forms.
User Input: "aaa"&"bbb" User Input: "aaa" AND "bbb"
Filter: (First Name = "aaa" or Last Name = "aaa") AND (First Name = "bbb" or Last Name ="bbb")
A minus symbol (-) or the word NOT indicates a logical AND NOT between two conditions. If the - operator or the NOT operator is placed at the beginning of the search test, the operator is used as NOT. If the - operator or the NOT operator is placed at the end of the search text, the operator is ignored.
User Input: "aaa" NOT "bbb"
Filter: (First Name = "aaa" or Last Name = "aaa") AND NOT (First Name = "bbb" or Last Name = "bbb")
User Input: -"aaa"
Filter: NOT (First Name = "aaa" or Last Name = "aaa")
User Input: "aaa" AND "bbb" NOT
Filter: (First Name = "aaa" or Last Name = "aaa") AND (First Name = "bbb" or Last Name = "bbb")
A form name (not case-sensitive) followed by a colon can be used to search on a specific form.
User Input: [Last]:aaa
Filter: Last Name like "aaa"
User Input: [First]:aaa OR [Last]: bbb OR ccc
Filter: (First Name like "*aaa*") or (Last Name like "*bbb*") or (First Name like "*ccc*" or Last Name like "*ccc*)
A minus symbol (-) or the word NOT indicates a logical AND NOT between two conditions. If the - operator or the NOT operator is placed at the beginning of the search text, the operator is used as NOT. If the - operator or the NOT operator is placed at the end of the search text, the operator is ignored.
User Input: "aaa" NOT "bbb"
Filter: (First Name = "aaa" or Last Name = "aaa") AND NOT (First Name ="bbb" or Last Name = "bbb")
User Input: - "aaa"
Filter: NOT (First Name = "aaa" or Last Name = "aaa")
User Input: "aaa" AND "bbb" NOT
Filter: (First Name = "aaa" or Last Name = "aaa") AND (First Name = "bbb" or Last Name = "bbb")
A comparison operator (<, <=, >, >=) can be placed in front of a condition. The comparison operator must be the first character in the search text or preceded by blank spaces.
Input: ID > 3000
Filter: ID greater than 3000

Related topics

Searching by object type, creation date, and other criteria
Searching for objects: Quick search
Applying a filter to a report instance: View filters
Filtering data based on business attributes