Advanced Search Syntax

July 1st, 2008 by alan ·

We at Zenbe understand in today’s world of multi-gigabyte mailboxes, the ability to find something in your mailbox quickly and easily is of utmost importance.  Which is why Zenbe provides an extensive set of features including a rich Advanced Search UI  and Filtering mechanism.  They are powerful yet user friendly tools to locate information.

However, for the expert users the most powerful search tool might be the simple search box.   I use it everyday, and today I like to share with you the secrets of our search syntax.

Search Terms

A search is made up of one or more search terms separated by spaces. Terms containing a space must be wrapped in double quotes. E.g.,

“new york”
“pedro martinez”

By default, terms are joined by the AND operator. Valid term operators are AND, OR, and NOT (not case sensitive). NOT binds before AND. AND binds before OR.  There are special terms we call tokens.  Valid tokens are:

  • from:
  • to: (searches to, cc, and bcc fields)
  • cc:
  • subject:
  • tag: (searches both system & user tags)
  • body:
  • before:  (date)
  • after:  (date)
  • viewed:  (true or false)
  • has_attachments: (true or false)

Here are some example of searches using tokens:

  • sidebar tag:zenbe  (This searches for all emails containing the word sidebar tagged zenbe)
  • tag:accountant  (This searches for all emails tagged accountant)
  • from:alan  (This searches for all emails from sender alan)
  • tag:”new york” from:”pedro martinez”  (Searches for emails tagged new york from sender Pedro Martinez)
  • tag:zenbe -from:peter  (returns emails tagged zenbe that are not from peter)
  • (from:peter or from:alan) viewed:false  (return emails from either peter or alan that are unviewed)
  • -(from:peter or from:alan) tag:design  (return emails from anyone besides peter and alan tagged design)
  • before:6-25-2007  (return emails from before 6-25-2007)


In the example with the term -from:peter, it is the same as NOT from:peter.  A ‘-’ before a token negates the meaning.

System Tags

The following tags are special system tags (as opposed to user-created tags):

  • tag:Inbox
  • tag:Starred
  • tag:Drafts
  • tag:Sent
  • tag:Spam
  • tag:Deleted
  • tag:Archive
  • tag:Unread

These system tags allow you to easily search in your Inbox or Sent emails, etc.  The system tag names has to be capitalized.  Here are some example uses:

  • tag:Inbox tag:Unread
  • (tag:Spam OR tag:Deleted) “some missing email”

The first example will return any Unread emails in the inbox, and the second example will return any emails in the Spam or Deleted tags that contain the phrase “some missing email”  I hope this blog post will help you make the most out of the very powerful search engine underneat the Zenbe hood.  Enjoy.

One Response to “Advanced Search Syntax”

  1. kyleabaker Says:

    This is great guys! But I’ve got to be honestly…I rarely go in and manually type these things. In Gmail I always use these, but I click on the “Show search options” link and use them that way.

    Maybe slightly comparative to your “advanced search”, but the way Gmail lays it out is so user friendly. Too many menu’s for me is a killer.

    Also, Gmail 2.0 takes advantage of “System Tags” so the url is always the same for folders, labels and emails…even among different accounts. That is a nice options cause I can easily send a link to a friend for them to find an old email that maybe they couldn’t find before, granted I had the email as well.

    It seems to stay static in zenbe and that is a bit bothersome to me when it just makes sense to be taking advantage of your own features to make things easier on the end users..like the example above! I can even bookmark things with my browser in my email and go straight to it whenever I need to. It’s fantastic!

Leave a Reply