Search syntax
How FOLD reads a search query: words, phrases, AND, OR, exclusion, groups and regular expressions.
Where you search
On the Mac, ⌘F moves to the search field above the message list. The Search syntax button next to it lists common operators and inserts one on click. Search covers all accounts; with a folder selected, the Search in: bar narrows it to This folder (or Current view in a unified mailbox).
On iPhone and iPad, the search screen covers all accounts. The command palette can start a search, too.
Words and phrases
Every word must match, as the beginning of a word: invo finds “invoice”. Case and accents are ignored.
Double quotes match a phrase exactly: "quarterly report". Quote operator values that contain spaces:
subject:"annual report" from:anna
A word with a colon is read as an operator; an unknown one gives “The search query couldn’t be parsed. Check parentheses and operators.” Quote it to search for it literally: "12:30".
Combining terms
- A space means AND;
ANDin capitals does the same.ORin capitals means either. Lowercaseandandorare ordinary words. - AND binds tighter than OR:
from:anna invoice OR from:benmeans “(from Anna and containing invoice) or from Ben”. Parentheses change that:(from:anna OR from:ben) invoice. NOTis not a keyword but an ordinary word.
OR between text and filters such as is: or before: works; very large combinations are rejected with “This search can’t be run as written. Please simplify it”.
Excluding with a minus
A minus in front of a status value excludes it: -is:read finds unread messages, -is:flagged messages without a flag.
Other exclusions do not work yet:
- In front of a word, a phrase,
from:,to:,cc:,bcc:,subject:orbody:, the minus makes the search fail with an error. - In front of
before:,after:,size:, a tag or a regular expression, the minus is ignored: the term is included, not excluded. -in:and-account:are rejected; a minus in front of parentheses is not reliable either.
Regular expressions
A regular expression goes between slashes and is checked against subject and sender only, never against the text or the recipients:
/^Re: \[JIRA-\d+\]/
from:ci@example.com /(?i)failed/
Matching is case-sensitive; (?i) at the start ignores case. Write a slash as \/. An invalid pattern does not filter.
What the search looks at
FOLD searches a full-text index (SQLite FTS5) on your device with subject, sender, To and Cc of every message. Full messages are downloaded only when you open them, so the text of received messages is not indexed yet: plain words find subject and addresses, and body: finds message text only in a few cases, such as the beginning of messages you sent with FOLD. Accounts in Fortress Mode keep no text in the index; only filters such as is: or before: find their messages.
Order of results
Results are sorted by date, newest first. Ranking by relevance (BM25) exists in the search engine but cannot be chosen in the app yet.
Size, tag and regular-expression filters are applied page by page after the index lookup, so with a very broad query the list can end before every match is shown; add a word or operator to narrow it.