Advanced search techniques


Posted by Nick White on Wednesday, May 09, 2007 2:41 PM 99 Comments

Advanced Search Terms -- Operators to Help You to Create More Defined Searches

Windows Vista and Windows Desktop Search 3.01 recognize many advanced query operators that can make your desktop searches super-pinpointed.  This document provides an exhaustive list of those operators.  On Windows Vista you can use these operators to define a search, and then save it as a Search Folder.  Once you start using these terms in searches and Search Folders, you'll wonder how you ever got along without them!

Quick Start Operators

Type this ...

To find this ...

windows

Items containing WinDOwS, windows, WINDOWS or any other combination of uppercase and lowercase letters

microsoft windows

Items containing both words microsoft and windows

microsoft NOT windows
Note: The word NOT must be in all uppercase letters

Items containing microsoft, but not windows.

microsoft not windows
Note: The word not must be in all lowercase letters

Items containing all three words—microsoft, not, windows—but not necessarily in that order

microsoft OR windows
Note: The word OR must be in all uppercase letters

Items containing microsoft, windows, or both.

microsoft or windows
Note: The word or must be in all lowercase letters.

Items containing all three words—microsoft, or, windows—but not necessarily in that order

"microsoft windows"

Items containing the exact phrase microsoft windows.

microsoft has attachment:true

Items that have attachments containing the word microsoft

microsoft isattachment:true

Items that are attachments containing the word microsoft

microsoft date:yesterday

Items containing the word microsoft whose date is yesterday

Windows Desktop Search also recognizes the following date values:

·          Relative dates: For example, today, tomorrow, yesterday

·          Multi-word relative dates: For example, this week, next month, last week, past month, coming year

·          Days: Sunday, Monday ... Saturday

·          Months: January, February ... December

 

author: patrick

Items created by someone whose name contains the word patrick.

author:"patrick hines"

Items created by patrick hines.

subject:"microsoft windows"

Items whose subject contains the phrase microsoft windows.

subject:microsoft windows

Items with the word microsoft in the subject line and windows anywhere else in the document.

 

Advanced Operators

Desktop Search syntax

Keyword/ Symbol

Example

Function

NOT

microsoft NOT windows

Finds items containing microsoft, but not windows

-

microsoft - windows

Finds items containing microsoft, but not windows

AND

microsoft AND windows

Finds items containing microsoft and windows

+

microsoft + windows

Finds items containing microsoft and windows

Quotation marks

"microsoft windows"

Finds items containing the exact phrase microsoft windows

Parentheses

(microsoft windows)

Finds items containing the terms microsoft and windows in any order

> 

date: >11/05/04
size: >5

Finds items with a date after 11/05/04
Finds items with a size greater than 5

< 

date: <11/05/04
size: <5

Finds items with a date before 11/05/04
Finds items with a size less than 5

Note: Boolean operators must be in all UPPERCASE letters.

Boolean operators

Property

Example

Function

has:attachment

report has:attachment

Finds items containing the word report that have attachments. Same as hasattachment:true

is:attachment

report is:attachment

Finds items that have attachments containing the word report. Same as isattachment:true

before:date

before:10/9/2004

Finds items whose PrimaryDate field contains a date before 10/9/2004.

after:date

after:10/9/2004

Finds items whose PrimaryDate field contains a date after 10/9/2004.

author:name

author:patrick

Finds items with patrick in the author property.

author:"name"

author:"patrick hines"

Finds items with the words patrick hines, in that order, in the author property.

author:(name)

author:(patrick hines)

Finds items with patrick and hines in the Author property.

author:(name OR name)

author:(patrick OR bob)

Finds items with patrick or bob in the Author property.

author:name name

author:patrick bob

Finds items with patrick in the Author property and bob anywhere in the document.

from:name

from:patrick

Finds items with patrick in either fromName OR fromAddress, since "from" is a property name for both fromName and fromAddress.

Numbers and ranges

To specify a date range, type the property followed by two dates.  Closed date ranges are indicated by typing "...".  For example, type from:david sent:11/05/04...11/05/05.  Windows Desktop Search recognizes all Windows date formats and also recognizes the following values:

·         Relative dates: For example, today, tomorrow, yesterday

·         Multi-word relative dates: For example, this week, next month, last week, past month, coming year

·         Days: Sunday, Monday ... Saturday

·         Months: January, February ... December

Dates and date ranges

Syntax

Results

size:>50 <70

Searches for files with a value in the Size property between 50 and 70, excluding those sizes

size:>=50 <=70

Searches for files with a value in the Size property between 50 and 70, including those sizes

date:>2/7/05<2/10/05

Searches for a date in the Date property between the values 2/7/05 and 2/10/05, excluding the end dates

date:>=2/7/05<=2/10/05

Searches for a date in the Date property between the values 2/7/05 and 2/10/05, including the end dates

Common file properties

The syntax listed in the preceding table can be used with any of the following file properties.  For example, to find email from "jake" that was sent in 2005, your query would look like this: kind:email author:patrick after:12/31/2004. 

To restrict by file type

Use

Example

Communications

communications

kind:communications

Contacts

contacts

person

kind:contacts

kind:person

E-mail

email

kind:email

Instant Messenger conversations

im

kind:im

Meetings

meetings

kind:meetings

Tasks

tasks

kind:tasks

Notes

notes

kind:notes

Documents

docs

kind:docs

Music

music

song

kind:music

kind:song

Pictures

pics

pictures