The following syntax can be used for keyword search expressions:
| expression | ||
| element [operator element [operator element [...]]] | ||
| element | ||
| keyword | True if keyword exists in the list | |
| "keyword" | True if keyword exists in the list ¹ | |
| * | True if keyword list is not empty | |
| # | True if keyword list contains at least one non-hidden keyword ² | |
| (expression) | True if expression is true | |
| !element | True if element is false | |
| operator | ||
| & | AND: True if both elements are true | |
| | | OR: True if either element is true (or both elements are true) | |
Operators are executed strictly from left to right. Expressions inside parentheses are always executed first.
¹ If a keyword contains one of the special characters above (*#()!&|), it should be enclosed in quotes ("").
² A hidden keyword is a keyword that begins with the underscore ( _ ) character.
Examples:
| 1. | color | Matches any keyword list that contains the keyword "color". |
| 2. | "b&w" | Matches any keyword list that contains the keyword "b&w". "b&w" must be in quotes since "&" is an operator. |
| 3. | one|two|three | Matches any keyword list that contains any or all of the keywords "one", "two", or "three". |
| 4. | one|two&!three | Matches any keyword list that contains the keyword "one" and/or "two", but does not contain the keyword "three". |
| 5. | *&!two | Matches any keyword list that contains at least one keyword, but does not contain the keyword "two". |
| 6. | (1|one)&(3|three) | Matches any keyword list that contains the digit or word "one" and the digit or word "three". |