Demystifying Gmail Search - II

In my earlier article, I had explored some techniques that one can easily make out while searching. However, there are some features that are not available in the simple search facility. Let us get down to the advanced search features.

For typing a query, you need not open the simple search view. Just directly type the query in the default query box.
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

In order to be a master in searching, you have to know the operators used for searching. To know briefly about the operators pay a visit to: https://gmail.google.com/support/bin/answer.py?answer=7190

Also, have a look at how to create filters and labels. This is a must use tool in Gmail. Don’t miss it out. Visit https://gmail.google.com/support/bin/answer.py?answer=6579

In the rest of this article, the functions of operators have been elaborated. 

from: used to specify the sender and fetches all mails from the same.

It is the same as the ‘from’ in the simple search.

Example 1: Extract all mails from friends, say abc, abc1, abc2. Then your query will be like this:
from: abc@hotmail.com OR abc1@yahoo.com OR abc2@gmail.com

Example 2: Extract mails from friends, say abc, abc1 and not from abc2. Then your query goes like this:
from: abc@hotmail.com OR abc1@yahoo.com -abc2@gmail.com

Example 3: Extract all the mails from except from abc.
from: -abc

Example 3: Extract all mails, except those from yahoo or gmail.
from: -yahoo.com –gmail.com

to: used to specify the recipient and fetches all mails from the same. It is the same to the TO in the simple search.
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

Example 4: Extract all mails sent to friends, say abc, abc1 and abc2. Then your query should be.
to: abc@hotmail.com OR abc1@yahoo.com OR abc2@gmail.com

Example 5: Extract mails sent by groups, i.e. mails you received from groups. 
to: yahoogroups.com

Example 6: Similarly, exclude the mails from yahoogroups 
to: -yahoogroups.com

subject: Searches for the subject words

Example 7: Search for a single word
subject: Chennai

Example 8: Search for more than one word. In this example, to include all mails with subject Chennai and Mumbai and reject mails with subject kolkatta

Subject: (Chennai OR Mumbai) subject: –kolkatta

cc and bcc:
This operator function is similar to the to: and from: operator. It is used to give the email address or just the account name or just the service provider address to fetch the mails.

Example 9: Fetch all the mails that you had CCed or BCCed.
cc:abc@yahoo.com
bcc:abc1@yahoo.com

label: Searches mails that hold a label.

Example 10: Let us assume that you have labels and have applied to some mails. Say you have a label called “Family” for mails you receive from your family members. Now you want to search for mails sent your mom only. Here, I am considering that both dad and mom use the same mail id.
label:family from:familyhead@gmail.com mom OR dad

Example 11: Another example to show is from my inbox. I have grouped all the fun related mails from various groups such as Nidokidos, myWorldPals, etc. under the label named “Others”. All mails arriving from that group would be fixed with the label “Others”. Now I need to search mails using this label, which has photos regarding “Katrina”.
label:Others (subject:nidokidos OR myworldpals)

Another example that rejects all mails with subject beautifulIndia is:
label:Others subject:-BeautifulIndia

Note: If you have label names separated with spaces, then use hyphen(-) during your searches. Hyphen, i.e. the negation operator is different from this hyphen used in label names. E.g., if you have a label called “Fun Mails”, then while searching use as label:Fun-Mails. Here, note that there is no space in-between Fun and Mails. If you introduce a space, then the query will search for mails with label Fun and reject all mails with the word Mails.

i.e. label:Fun –Mails

It is possible to apply one or more label name to a single mail. Example, if you have received a mail from your friend relating to a job matter, then you would apply the labels Friend and Jobs. Therefore, most of the mails may posses more than one label. In such cases, to search mails pertaining to a particular label while rejecting those with the other label, the simple thing to do is to use Negate Operator, i.e. Hyphen.

Example 12: You need to extract all mails from your friend that do not have job information, i.e. does not have the label named Jobs.
label:friend –label:JOBS

Example 13:
Search mails from your friend with attachment, which has only Word document or PDF files as the attachments.
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

label:Friend has:attachment filename:(pdf OR doc)

in: used to search mail in a specific location, i.e. Inbox, Archives, Trash, Sent Items, etc. If you need to search in other locations, except Inbox, you could use this operator.

This operator really helped a lot in my case, as I had about 30,000+ mails in my trash.

Example 14: Searching your trash box for a mail that you deleted unknowingly. For all mails from your friend that had moved to trash:
in:trash label:friend

You can now combine all the above said operators to search for your mails.

Example 15: Search your trash and archives folders as you are not confident about a mail’s location that has an attachment of pdf file from your company.
in:anywhere has:attachment filename:pdf

is: operator helps you fetch mails that have been read, unread, starred, etc.

Example 16: To fetch all mails that you haven’t read that your friend had sent:
label:friend is:unread

Try with is:read is:unread, yeah you can guess what would be the result.

is:read – gives all the mails you have read;
is:unread – gives mails that you have not read; and
is:starred – gives all the mails that have been starred, irrespective of whether you have read them or not.

after:, before: These date operators are used to input a query based on date values. The date format, discussed in the first part of this article series as YYYY/MM/DD, is used.

Example 17: To search all mails that arrived after June 4th 2005 and up till date,
after:2005/06/05

Example 18: To search for mails that have arrived on particular date, use both the operators
after:2005/09/10 before:2005/09/11

Using after:2005/09/10 before:2005/09/10, will give you all the mails.

The author is an engineer. This article also appears on his informative blog smaheshwaran.blogspot.com. He can be reached on smaheshwaran@gmail.com.

This article has been rewritten for brevity and clarity.



Added on July 18, 2007 Comment

Comments

Post a comment

Your name:

Comment: