| Query expression | Matches documents that... |
| starship | Contain the term starship in the body of the message |
| starship magic starship or magic | Contain the term starship or magic, or both, in the body of the message |
| +starship +magic
starship AND magic | Contain both starship and magic in the body of the message |
| from:James | Contain the term James in the from field |
| from:James -subject:rant
from:James AND NOT subject:rant | Have James in the from field and don't have rant in the subject field |
| (Ranma OR Akane) AND fighting | Contain fighting and must also contain Ranma and/or Akane, all in the body of the message |
| from:"Homer Simpson" | Contain the exact phrase "Homer Simpson" in the from field |
| subject:"another mess"~5 | Contain the terms another and messs within five positions of one another in the subject field |
| fight* | Contain terms that begin with fight, like fighting, fighter, and fights |
| java~ | Contain terms that are close to the word java, such as lava (This may be useful for romanization issues) |
| date:[2004-01-01 TO 2004-12-31] | Have date field values between the dates January 1, 2004 and December 31, 2004 |
Please note that operators like AND, OR, NOT, and TO must be in all caps to work.
More elaborate queries are possible. The query language is described here. The following fields can be searched on: