Quick Tip: Sort Gmail with an advanced keyword search

Google Apps users, assuming they want to be efficient and productive, have to master the art of keyword search.

There is one subtle, yet very important, difference between Google Apps and Microsoft Office that must be confronted and accepted by all users making the switch to a Google Apps suite of productivity software. Google Apps uses search as its engine for finding documents. By contrast, Microsoft Office uses hierarchical folders as its organizing mechanism (for the most part).

In practical terms, that means Google Apps users, assuming they want to be efficient and productive, will have to master the art of keyword search.


The basic search method of typing a keyword into the search box in Gmail for example is simple enough, but it can also often be ineffective. In Figure A, I searched my personal Gmail account for "TechRepublic" and, as you can see, I received a rather long list of emails.

Figure A

Searching just TechRepublic


However, if I use the more advanced search tools, like in Figure B, I can limit the results to a potentially more pertinent list of emails. In this case, I am looking for emails mentioning TechRepublic, but only those sent to me by Bill Detwiler. I could also specify a specific subject and further narrow the search.

Figure B

Narrow the search to emails from Bill Detwiler


The good news is you don't have to memorize all of the various advanced search parameters. Click the dropdown button at the right end of the search box to get a dialog box (Figure C) where you can fill in the most common search limiting parameters.

Figure C

Common search limiting parameters
Google also provides a table (Table A) of the entire search limiting parameters available, which is useful if you find yourself in need of even more advanced search tools.

Table A

Search Operators and Shortcuts Shortcut Action Examples
from: Search for sender from:me Sent from you from:joe Sent from Joe
to: Search for recipient to:joe To Joe To anyone at
subject: Search in subject line subject:legal Contains "legal" in the subject subject:legal from:lee From Lee with "legal" in subject
" " Search for exact phrase "purchase order" Contains "purchase order"
OR must be uppercase Matches terms receipt OR invoice Contains the words "receipt" or "invoice" from:amy OR lee From either Amy or Lee
- (hyphen) Exclude terms from search subject:order -new Subject contains "order" but not "new" "new books" -today Contains "new books" but not "today"
( ) Group search words using AND from:amy (legal law) From Amy, contains "legal" and "law"
{ } Group search words using OR from:amy {legal law} From Amy, contains "legal" or "law"
in: or label: Search by label from:joe in:action From Joe, with the label "Action"
list: Search to/from mailing lists To or from ""
after: before: Sent during specified time

(format: yyyy/mm/dd)

after:2009/1/27 Sent/received after January 27, 2009 after:2008/5/1 before:2008/7/31 Sent/received after May 1, 2008 and before July 31, 2008
in:inbox in:trash in:spam in:anywhere Search in the Inbox, Trash or Spam, or All labels in:inbox to:amy Sent to Amy and in your inbox in:anywhere review Contains "review" in All Mail, Spam, Trash
is:starred is:unread / read Search messages that are starred, unread, or read is:unread from:amy Unread messages from Amy
cc: / bcc: Search cc: and bcc: fields cc:lee Message cc'd to Lee
has:attachment Search for attachments has:attachment from:me Messages sent from you containing an attachment
filename: Search attachments by name or type filename:project Messages with attachments named "project"
is:chat Search for chat messages is:chat project Any chat message using the word "project"


Mark W. Kaelin has been writing and editing stories about the IT industry, gadgets, finance, accounting, and tech-life for more than 25 years. Most recently, he has been a regular contributor to,, and TechRepublic.


While I use Gmail on the web as it was originally meant to be used, I sometimes want to do a cleanup and get rid of the large quantity of junk that builds up. Mostly from subscriptions and the like where I end up with a buildup of no longer relevant Daily or Weekly emails. Anyway... Since I also use Outlook for my required work emails, I thought I'd take advantage of Outlooks capabilities. What I did, that is relevant to this article, was I set up Gmail in Outlook as IMAP. Now when I load my gmail account in Outlook, I can then sort by Sender or subject and scroll through the list and mass delete those groupings I want gone forever. Each his own... Works for me.


I love Gmail and Google Apps mail, but the lack of any kind of sorting (other than date) drives our clients nuts! Sorting is, by FAR, the most common question/gripe we receive regarding Google Mail!


>>>> I have been using the folders metaphor for so long, that I find it difficult to change my approach to search versus navigate a hierarchy.

Mark W. Kaelin
Mark W. Kaelin

I have been using the folders metaphor for so long, that I find it difficult to change my approach to search versus navigate a hierarchy. Does searching for documents and emails come easier to you?


Amen to that Sorting feature. That is my biggest gripe about Gmail. I finally resorted to downloading my gmail into Outlook just so I could sort.


Yeah, with the title "Sort Gmail with an advanced keyword search" I was hoping to learn some way of sorting emails (e.g. on size) via a new search keyword, but alas it was just a misleading article title. 8-(


The article is more about "filtering" (which is very useful!). "Sorting" would be nice...the best I can find are the different inbox "types" ("Classic", "Important first", "Unread first", "Starred first" and "Priority Inbox"). Does anyonw know if other "types" can be created?

Editor's Picks