| #

## Syntax Used for Keyword Strings

Administrators can specify the keywords to locate using several different methods. Properly formatted keyword search strings reduce the number of matches and make searches more efficient and productive. ScanMail allows administrators to use logical operators, wildcards, and Advanced Query Syntax (AQS) or Keyword Query Language (KQL) to narrow the scope of keyword searches.

#### Keyword Syntax

Type of Syntax | Description | Examples
--- | --- | ---
Logical operators | Use uppercase logical operators (AND, OR, NOT) to separate multiple keywords. | administrator AND password Matches mailbox components that contain both the words “administrator” and “password” administrator OR salary Matches mailbox components that contain either the word “administrator” or “salary” administrator AND NOT payroll Matches mailbox components that contain the word “administrator” and do not contain the word “payroll”
Parentheses | Use parentheses () to group keywords in specific patterns. | (administrator OR password) AND NOT salary Matches mailbox components that contain either the word “administrator” or “password” and do not contain the word “salary” (administrator AND NOT password) OR salary Matches mailbox components that contain the word “administrator” and do not contain the word “password”, or mailbox components that contain the word “salary”
Double quotation marks | Use double quotation marks (“”) to search for phrases. | “administrator salary” Matches mailbox components that contain the phrase “administrator salary” “administrator salary” AND “year ending” Matches mailbox components that contain both the phrases “administrator salary” and “year ending” (“administrator salary” OR payroll) AND “year ending”) Matches mailbox components that contain the phrase “administrator salary” or the word “payroll”, and also contain the phrase “year ending”
Wildcard (asterisk) | Use an asterisk (*) as a wildcard operator to search for a range of keywords starting with a specific string.
| ##### Note ScanMail only supports the use of wildcard symbols at the end of a string.
| admin* Matches mailbox components containing words beginning with “admin” Examples: admin, administrator, administration, administrative
Advanced Query Syntax (AQS) | AQS is a Windows search query language that allows for programmatic searching of the Exchange 2010 environment. | For a detailed explanation and code examples for using AQS, refer to the following website: http://msdn.microsoft.com/en-us/library/bb266512.aspx
Keyword Query Language (KQL) | KQL is a search query language that allows for programmatic searching of the Exchange 2013 environment. | For a detailed explanation and code examples for using KQL, refer to the following website: http://msdn.microsoft.com/en-us/library/ee558911.aspx