Advanced search techniques

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

kind:pics

kind:pictures

Videos

videos

kind:videos

Folders

folders

kind:folders

Folder name

foldername

foldername:mydocs

Programs

programs

kind:programs

Recorded TV

tv

kind:tv

Link

link

kind:link

Journal entry

journal

kind:journal

 

To restrict by file store

If you use several email accounts and you want to limit a query to either Microsoft Office Outlook or Outlook Express, you can use the store: indicator.

Store

Use

Example

Files

file

store:file

Offline files

csc

store:csc

Outlook

mapi

store:mapi

Outlook Express

oe

store:oe

 

Properties for file type: All

These are file format-specific properties you can use

Property

Use

Example

Title

title, subject, about

title:manager

Status

status

status:active

Date

date

date:lastweek

Date modified

datemodified, modified

modified:lastweek

Importance

importance, priority

importance:high

Size

size

size:>50

Deleted

deleted,isdeleted

isdeleted:true

Is attachment

isattachment

isattachment:false

To

to, toname

to:johnsmith

Cc

cc, ccname

cc:david

Company

company

company:adventure-works

Category

category

category:business

Keywords

keywords

keywords:sports

Album

album

album:greatest

File name

filename, file

filename:2006hits

Genre

genre

genre:jazz

Author

author, by

author:david

Folder

folder, under, path

folder:sample

Ext

ext, fileext

ext:.rtf

File name

filename, file

filename:sample

Tags

tag, keyword

tag:personal

Type

type

type:image

 

Properties for file type: Contact

These are great Outlook contact-specific operators

Property

Use

Example

Job title

jobtitle

jobtitle:manager

IM address

imaddress

imaddress:luis@adventure-works.com

Assistant's phone

assistantsphone

assistantsphone:sample

Assistant name

assistantname

assistantname:roberto

Profession

profession

profession:accountant

Nickname

nickname

nickname:louis

Spouse

spouse

spouse:susana

Business city

businesscity

businesscity:redmond

Business postal code

businesspostalcode

businesspostalcode:98052

Business home page

businesshomepage

businesshomepage:www.adventure-works.com

Callback phone number

callbacknumber

callbacknumber:sample

Car phone

carphone

carphone:sample

Children

children

children:anna

First name

firstname

firstname:maria

Last name

lastname

lastname:gonzalez

Home fax

homefax

homefax:sample

Manager's name

manager

manager:carlos

Pager

pager

pager:sample

Business phone

businessphone

businessphone:sample

Home phone

homephone

homephone:sample

Mobile phone

mobilephone

mobilephone:sample

Office

officelocation

officelocation:red/101

Anniversary

anniversary

anniversary:yesterday

Birthday

birthday

birthday:tomorrow

 

Properties for file type:  Communications (email, appointments)

These operators can help you quickly find that right set of email or that contact you need.

Property

Use

Example

From

from, organizer

from:simon

Received

received, sent

sent:yesterday

Subject

subject, title

subject:budget

Has attachment

hasattachment, hasattachments

hasattachment:true

Attachments

attachments, attachment

attachment:presentation.ppt

Bcc

bcc, bccname

bcc:michael

Bcc address

bccaddress, bcc

bccaddress:sample

Cc address

ccaddress, cc

ccaddress:sample

Follow-up flag

flagstatus

flagstatus:unflagged

flagstatus:followup

flagstatus:completed

To address

toaddress, to

toaddress:sample

Due date

duedate, due

due:10/15/2006

Read

read, isread

isread:false

Is completed

iscompleted

iscompleted:true

Incomplete

incomplete

incomplete:true

Has flag

hasflag, isflagged

hasflag:false

Duration

duration

duration:>120

 

Properties for file type:  Calendar

Need to find an appointment?  These appointment-specific operators can let you quickly search your entire calendar.

Property

Use

Example

Recurring

isrecurring

recurring

isrecurring:true

recurring:true

Organizer

organizer, by, from

organizer:jonas

Location

location

location:calgary

 

Properties for file type:  Documents

Here are some handy doc-specific operators.  "Last saved by" is super-useful when a document is being co-authored by a group of people.

Property

Use

Example

Comments

comments

comments:excellent

Last saved by

lastsavedby

lastsavedby:Josh

Document manager

documentmanager

documentmanager:sample

Revision number

revisionnumber

revisionnumber:4a

Date last printed

datelastprinted

datelastprinted:yesterday

Slide count

slides

slides:>20

 

Properties for file type:  Music

Music fans, these terms will let you find that track or group of tracks you need in an instant.

Property

Use

Example

Bit rate

bitrate

bitrate:>150kbps

Artist

artist, by

artist:sample

Year

year

year:sample

Duration

duration

duration:sample

Album

album

album:"greatest hits"

Genre

genre

genre:rock

Lyrics

lyrics

lyrics:"happy birthday to you"

Track

track

track:12

Year

year

year:>1980<1990

 

Properties for file type:  Picture

If you're a shutterbug and just want to share some photos with friends and family, these terms can help to manage your library of photos.

Property

Use

Example

Camera make

cameramake

cameramake:sample

Camera model

cameramodel

cameramodel:sample

Dimensions

dimensions

dimensions:sample

Orientation

orientation

orientation:sample

Date taken

taken

datetaken

taken:last year

datetaken:6/12/2006

Width

width

width:sample

Height

height

height:sample

Flash mode

flashmode

flashmode:no flash

 

Properties for file type:  Recorded TV

Find that TV show or movie and grab some popcorn.

Property

Use

Example

Broadcast date

broadcastdate

broadcastdate:2005

Channel number

channel

channel:7

Closed captioning

closedcaptioning

closedcaptioning:true

Date released

datereleased

datereleased:2005

Episode name

episodename

episodename:sample

 

Properties for file type: Video

Property

Use

Example

Name

name, subject

name:sample

Ext

ext

filext

ext:sample

filext:sample

 


Comments

  1. Posted on: July 29, 2007 at 1:44PM  

    well, mysteriously, I can now find files with names like "10-med" by searching for "med" but I still can't find files files like "TheMillerGirl" when putting a search in for Miller.  Also even though I can get a results for "med" if I try and do a select all (Ctrl+a) and then delete it doesn't work.  I have no problems doing this in XP.  Are there any solutions to these problems?  Is there any way to switch between the vista style search and the classic XP style search?

  2. Posted on: July 30, 2007 at 8:29AM  

    Although I think someone has already asked this, I don't see an answer.  I cannot figure out how to search for all Word documents that contain a specific word in the contents of the documents.  I have tried typing the word in the search box, but that absolutely does not work for me.  That is, even when I type a word that is in a document that I just saved: no results.  I find it frustrating that the advanced search has no field for this even though XP did.  Very maddening.

  3. Posted on: August 06, 2007 at 6:02PM  

    Sorry for the delay in the response, slmscraggle and jhester, but we've been checking with the people on the Windows Search team.  I just got this response.  Please see if it helps - WRT the syntax:

    type:document  is a little ambiguous, since it will return “Adobe Acrobat Document”, “XML Document”, “XPS Document”, etc.  in addition to “Microsoft Office Word Document”

    The following would be more precise:

    ext:doc miller     (note that since we auto prefix match, ext:doc will also match on ext:docx)

    *.doc miller

    type:word miller   (this is still ambiguous, but less so.  since, this will also match on “WordPerfect Document” as well)

    type:”word document” miller

    Although we used slimscraggle's search term, it should work with any other one as well.

  4. Posted on: August 15, 2007 at 11:41AM  

    I'm still searching for a way to get Windows Vista search to work.  One the fixes for the flawed Windows XP search (from

    http://support.microsoft.com/kb/309173/en-us) was to set the FilterFilesWithUnknownExtensions DWORD value to 1 in the following registry key:

    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlContentIndex

    Why doesn't this work in Windows Vista?

  5. Posted on: August 17, 2007 at 12:43PM  

    Hey Sunflower34:  let me address your questions individually, as it seems there is misunderstanding about the use and functional extent of Desktop Search in Windows Vista.

    - white space in Start search dialogue

    Windows Vista search does differ from Windows XP because there is white space in the Start search experience that serves no purpose -- I'll grant you that.  But, being able to find your files in under 2 seconds far outweighs the annoyance of that white space.  In any case, that white space is instantly filled with results, much faster than competitors' products can return data.  But, know that we’re always looking for user experience feedback and that this is something that we’ll be addressing in future development, despite the fact that I'll assert that it doesn’t truly detract from the usability of search within our product.

    - strings as part of a filename file and user span of control

    Our search function searches both the contents of a file and its filename; in most cases, this yields exactly what the user is looking for, and right away.  In some cases a user will want to search for a string in a filename *or* within a doc, and we have provided the ability to do this.  One option is to bring up the Advanced Search pane.  Alternatively, you can learn some of the quick query syntax (like 'name:foo') to help narrow down the search.  In the vast majority of cases, people just want to find their files and don’t want to have to think about whether or not a string is in the filename or within a doc.  They just want to find their document quickly and efficiently.  We are optimizing for that case, rather than presenting the user with a smattering of options before they see the search results.

    In this way, we do not take the control away from the user, but instead we are clearing up the user experience so that every user isn’t presented with a myriad of choices every time they want to find a simple document or email.

    - search for file with 'path' in doc contents

    Here’s one way to resolve your search:

    1) Go to Computer, CD Drive, and open the CD in Explorer view

    2) Type: 'path' into the Instant Search field

    3) Use the Type column control to check '.bat' file type

    If you perform this specific search often -- or even if you want to have a slightly more specific search saved, that you can then progressively filter after executing the initial search --, I'd save the search as a Search Folder and get the habit of executing searches from there to save time.

    - searching for file 'test.R' containing word 'special'

    Window Vista’s search, like any desktop search, can only "crack open" document types for which is has an Ifilter.  .txt has a built in iFilter; have you tried installing an iFilter for .dat and .r files (likely sourced from a third party in the latter case)?

    In the case that there are no 3rd-party filters for these extensions, you can use the text filter, which can be set using the Indexing Options Control Panel | Advanced | .dat (Index Properties and File Contents).  If an extension is not in that list, you can add it via the same dialogue box.

    Hope this helps you in your searching as well as clarifying the extent of the search functionality in Windows Vista.  If you have further questions, I'd suggest taking them offline by sending us an email.

  6. Posted on: August 20, 2007 at 3:04PM  

    It's so frustrating dealing with Microsoft.

    From your response it seems that Microsoft does not care that they are taking away a needed capability for use with scientific files, and that a third party search tool is my only hope to search my files. For now, I'll run Windows 2000 on a VMWare box to be able to find files that Vista cannot find -- what an incredible, unnecessary pain because of a flawed Vista design.  I don't need this search feature every day, but now I cannot run it at all with Vista.

    I'll eventually have to pay the $100 or so for a 3rd party search tool since Windows Vista Ultimate is not very "Ultimate." The "Simple Search Scanner" will cost me about $100 -- http://www.kryltech.com/scanner.htm. You guys refuse to even let Windows Explorer for Windows 2000 work under Vista.  This wasn't a technical decision, rather a marketing stiff arm, because you are taking choices/capabilities away from customers needlessly.

    I am tired of paying Microsoft for screwing up things that worked as an excuse to take more of my money. The few improvements in Vista that I like are more than offset by the grief and lost productivity that Vista/Office 2007 provides.  

    Did your software engineers learn this in school?  "Premature optimization is the root of all evil (or at least most of it) in programming."  Donald Knuth

    Microsoft optimized search so much, that it sometimes doesn't work -- but you're blind to that reality.  Why am I paying money for a defective Vista Ultimate earch, so Microsoft can try to compete with Google?  The benefits of a fast indexed search are lost on me when I cannot find simple files that I know exist on my PC. Google is never going to index the files on my machine, and Microsoft isn't going to index most of them either.  I still need to occasionally search some of these files that are not indexed, however. You could give your customers either search option as needed, but in a condescending way, you've taken away the options I need.

    Linux and OpenOffice look better everyday especially when one is not respected as a paying customer.  

  7. Posted on: August 21, 2007 at 8:46AM  

    Thanks Nick for the syntax for searches.  That helped some, but I am still experiencing recently saved *.doc files that are not showing up.  They are saved to a flash drive that remains connected, but still no show.

  8. Posted on: August 22, 2007 at 4:26PM  

    I completly agree with you sunflower34.

    2000 and XP allowed the user to display a plain or advanced search once and for all, now you have to play with the search each and every time...

    Be default, you are only allowed to see what Microsoft wants you to see (by directory and extension filtering).

    I do not want a Google or MS index based search system, I want the good old search facility that worked so well from Windows 98 to XP.

    I have PHP files from a customer: I have to play with search just to find them... and it is impossible "out of the box" to search for a function defined in an include file... This is making me waste - literally - hours. 6 to be precise, and MS is not going to reimburse me $300 (and counting) in lost productivity.

    Is there a way to delete this search system?

    Is there a way to install a plain and simple search system that is not a ressource hog, like the search system in XP?

    Is there a way of removing this search other than reinstalling XP?

  9. Posted on: August 22, 2007 at 9:24PM  

    Hey bpfh:  Sorry to hear of your toubles, but I'm nevertheless convinced that you can consistently find the search results you need using the search function built into Windows Vista.  It may be worth your time to familiarize yourself with the nuances of search syntax (see above), optimizing the Indexer (http://windowshelp.microsoft.com/Windows/en-US/Help/68dd14f2-a9cb-4134-a076-b8abb011a1f61033.mspx), and the use of Search Folders (http://windowshelp.microsoft.com/Windows/en-US/Help/50fdc72f-3274-4a53-ad84-c82c71a320cf1033.mspx) to shorten the time it takes to conduct routine searches.

    FWIW, it's currently not possible to turn off the search indexer in Windows Vista:  http://windowshelp.microsoft.com/Windows/en-US/Help/58bc79b0-6b79-411d-9e95-629e9904f0581033.mspx.  

    I hope this information helps.

  10. Posted on: August 24, 2007 at 11:54AM  

    Nick,

    Please listen.

    You and Microsoft are forgetting who the customer is.  Your attitude is arrogant and condescending.  We know exactly what we need to do and Microsoft is not helping and needlessly making an easy task difficult – actually impossible without a 3rd party tool now in Vista.  

    I'm not sure why anyone should trust the new Vista search since it cannot find all the "hits" by design.  You won't give users the option to do a search that is 100% correct and 100% complete.  But your flawed solution is fast, which apparently is the only thing that is important.

    Give us a choice, and give us a choice that works. Don't force a flawed "improvement" as the only way.  Use a carrot (something that works and works well) instead of a stick (do it our way because we know better than you).  

    Why does Microsoft refuse to listen and give us a quick solution?  Just let us run Windows Explorer from Windows 2000 in Vista.  Why do you refuse to provide that solution?  It's not impossible technically (at least with some trivial changes).  Microsoft freely chooses to take away the search ability from paying customers that has worked since Windows 95.  Why is Microsoft forcing us to look for some other solution that works in Vista instead of listening and addressing the real problem?

Trackbacks

  1. Posted by: Windows Vista Team Blog on May 09, 2007 at 8:25PM

    A couple of weeks ago we showed you some of the more popular keyboard shortcuts in Windows Vista. Now

  2. Posted by: Teamzille.de on May 10, 2007 at 3:02PM

    Mit Windows Vista hat Microsoft auch eine mchtige Suchfunktion in das Betriebssystem integriert. Diese Suchfunktion bietet aber noch wesentlich mehr Funktionen, als man auf den ersten Blick vielleicht denken knnte. So lsst sich zum Beispiel durch ein

  3. Posted by: US ISV Developer Evangelism Team on June 27, 2007 at 10:29AM

    In my travels amongst ISVs, I find very technical folks who find search in Vista a little, well…, rudimentary

  4. Posted by: Connected to Vista Bookmarks on August 07, 2007 at 9:42PM

    64-Bit Support Correct Disk Cleanup shortcut for Windows Vista 64-bit (Kristan M. Kenney, Canucky.net)

  5. Posted by: Scott Forsyth's WebLog on April 04, 2008 at 10:39AM

    Searching for file content on your computer or server is a common task and one where you would expect

  6. Posted by: Worth noting today | Trader Eyal on January 03, 2009 at 10:01AM

    Pingback from  Worth noting today | Trader Eyal

  7. Posted by: search not finding partial phrases | keyongtech on January 18, 2009 at 10:24AM

    Pingback from  search not finding partial phrases | keyongtech

  8. Posted by: Vista search anomalies | keyongtech on February 17, 2009 at 8:03AM

    Pingback from  Vista search anomalies | keyongtech