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: September 28, 2007 at 7:44AM  

    Hi Nick,

    Unless I am missing the point somewhere, then yes a Search Folder would solve this problem if I wanted to continually refer to email conversations with specific individuals or groups within a domain.

    But that is not the case.

    If I am contacted by email or by phone by somebody who I think I may have corresponded with before, or from a company domain where I might have spoken with one of their colleagues; but I am not sure, then I will do a "to: OR from:" search.

    * The beauty of the speed of Windows Search indexing is that I can do this in the first few moments of a conversation and then I am able to talk knowledgeably about an email conversation that we might have had months (or even years) ago – from the same person or same organisation.

    * The issue with the Search functionality is that you have to type the same search string in twice (accurately).

    This is not a "canned" search, the search strings are different many times a day and although over the period of a couple of weeks (whilst maintaining a conversation) a few might be repeated, in the long term they have little value, so it's not worth making a Search Folder for any of them - especially since you don't know how many times you might want to reuse one, if at all.

    Regards

    Graham

  2. Posted on: October 04, 2007 at 8:46AM  

    Nick,

    I posted a detailed description of my problem with search on Aug 31.  I would appreciate some sort of response.

  3. Posted on: October 04, 2007 at 3:41PM  

    Hi Nick,

    As jhester, I'm waiting for, and would appreciate, a reponse on a detailed described problem. Mine was posted September 21st.

  4. Posted on: October 11, 2007 at 11:05AM  

    I am having a problem with Windows Vista's search functionality. I am attempting to search for part numbers at work. These part numbers are in Excel files, and there are many files, so I don't want to have to search for them by opening each file, searching it, and closing it again. That's where the search function comes in. Unfortunately, the search function often 'finds' the part number in files that don't actually contain that part number, and at the same time don't find the part number in files that definitely contain it.

    As an example of what my procedure is, I do the following:

    1: Go to folder in which the files are contained.

    2: Put the file name into the search field (something like "54038-423G9" without the quotes).

    3: Make sure that the search function is searching subfolders and contents of the files and that the file type is "All".

    4: Wait for the files to show up.

    It takes a while, because there are a lot of files and the files are big, and sometimes it finds the files correctly. Other times it finds files that, when I look in them, don't actually contain the part number (I've 'unhid' all cells, just to make sure). But usually, when it's incorrectly finding those files, it also fails to find the part numbers in files in which I know the part numbers exist (I've checked to make sure, and they're there).

    What could I be doing incorrectly to get these odd results?

    - Zohar S.E.

  5. Posted on: October 16, 2007 at 6:15PM  

    I am having real problems getting Vista to find even the most basic thing. Personally I find it most useful to be able to search for a string in files, but this is completely impossible in Vista. Even if YOU think the new search is fab, please listen to you customers who say it lacks some very important features. If after all this you don't want to alter it, then could you please create some separate search tool we can download for the rest of us that just does what searches used to do in, say W2000?

    Example 1

    I wanted to find the exact phrase "six famous people" in files under a particular directory, so I typed it into the advanced search (with quotes), had all files/all sizes/etc being searched (including non-indexed files) and the search found a huge list of files. Great you'd think, but oh no. It was NOT finding the exact phrase, it was just finding files which contained all those words. Exactly what I didn't want or expect. Is this really the design? It's far from intuitive.

    Example 2

    I wasn't sure of the exact spelling/word used but I knew part of it. I don't remember the original, but take this as the example (which I have repeated, so it is still true). I searched for "search ignore" and it found no files. In fact, the file I knew existed contains "search ignores". Now what I wanted it to do was to match the string anywhere, not to try and interpret whole words. If I could remember the exact phrase I'd probably remember the exact filename too and wouldn't need the search (!)

    Example 3

    I was looking for COPENHAGEN in a directory full of .htm files. My search (using all possible options to find files) gave two hits. I knew this was wrong so I copied the entire directory onto a memory stick, took it to work, used W2000 to do the search and found all the files I was looking for - I forget how many but at least 5. This was after spending about 25 minutes trying to encourage Vista to find them. How is this superfast indexing helping me to do what I'd expect of even the most basic of operating systems. It certainly isn't saving me any time. I was actually forced at one point to open each file and search the page I was in - at least that found them.

    Example 4

    I created a test file - it was a copy of a an .htm file that had COPENHAGEN in it but Vista was refusing to "find". Please note Vista did find a couple of other files in the same directory with the same file extension - and I tried very hard to figure out what the difference was that meant one file was found the the other not, but it beats me. So now I have a copy of the file and I change the file extension to .txt (just in case) and I paste some test words and phrases into the very top of the file so I can use this for experiments. One was "what is wrong with this file that the search ignores it?" without the quotes. Then on the next line I had "xcvxcvxcv" - again without quotes. Then the rest of the file was what was in the original .htm I'd copied. I search for "search ignores" (with quotes) and it finds the file. I search for xcvxcvxcv (with and again without quotes) and it doesn't find the file. Why? It makes NO sense to me. Don't tell me Vista thinks xcvxcvxcv is not a sensible string to search for and so ignores it!! As if Vista or Microsoft could know what I want to write and search for in my files! So explain, please, why it cannot be found.

    There are plenty more tests I did and could list a whole lot more ridiculous and incongruous results I've obtained.

    The bottom line: I now know I have no control over what the search is doing, so even when Vista says "here's your results" I know it is probably not correct. Complete loss of trust I'm afraid.

    Please give your users the option to search like we used to, don't hide things away so we can't tell what is happening.

    Cheers

    J

  6. Posted on: October 17, 2007 at 1:54PM  

    Although you most likely had nothing to do with the creation of the search features in either MS Vista or MS Office, I have run into a new searching problem which, in my mind, is even worse than the ones I'd already experienced with Vista, and somebody needs to know.

    In MS Office 2007 I had typed the string QAA0003 many times throughout a 41 page file, but I was then requested to add some text next to each string. I copied the text, did a search for QAA0003, and began adding the text where needed. But then I got to a point where QAA0003 was listed twice in the same paragraph. MS Word's search found the first one, and - being lazy - I hit "Find Next" again to get to the next one. The search function skipped over it. I went back and tried it again, but the search refused to find what I could clearly see with my own eyes. I thought that perhaps there was some nuance in the apparent string that I just couldn't see, so I copied it and pasted it into the search field, backed up, and clicked "Find Next" again, but received the same results. MS Office 2007 refused to find the text string. Since I didn't know how many other strings might have been missed by MS Word's search function I copied the file to my other computer with MS Word 2003 and performed the same search. The results were flawless. MS Office, it appears, has the same or a similar problem as MS Vista has. While this makes sense considering that they were apparently produced at around the same time, it does not make sense considering that my company has spend a great deal of money on these products with the expectation that they will function better than the last generation did. While in most cases I have found MS Office very useful, it is this one glaring and unconscionable flaw that I cannot overlook.

    I don't want a response telling me about the benefits of the new search algorithms or tips on how to work around the issue. I want the problem solved. Please, if you have any influence at all at Microsoft, ask them on my behalf - on behalf of all Microsoft customers - to fix this. Thank you for your time.

  7. Posted on: October 24, 2007 at 4:08PM  

    Continuing saga of frustration with Vista Search

    Today I needed to search an old C:\Library directory for any file with the word "ellipse" since I was looking for a note about a special graphics algorithm I thought I kept some years ago.  This was a fairly simple search:  looking for a single word in the files of a directory and all its subdirectories.

    Windows Vista quickly returned 52 hits, which was fairly good.  Oddly, when I checked the box to "include non-indexed, hidden, and system files (might be slow)" I only saw 11 hits. I'm not sure how to explain how searching more gave fewer hits.

    To be sure I was finding all the files, I fired up a Windows 2000 VMware virtual machine on this very same Windows Vista (Ultimate) machine.  Through the virtual network I did the same search of C:\Library for the word "ellipse" using Windows Explorer from Windows 2000.  That search resulted in 69 hits, which was quite a few more than the 52 returned by Windows Vista.

    When will Microsoft seriously address the search problem in Vista?  When can I run Windows Explorer for Windows 2000 under Vista without all the overhead of a whole virtual machine?  

    Until there is a fix, I'll keep posting real world examples of frustrations with Vista's search.

  8. Posted on: November 03, 2007 at 2:36PM  

    Reading through these comments, Nick, I frankly don't find them excessively helpful.

    THIS IS WHAT I WOULD LIKE TO BE ABLE TO DO EASILY:

    Find a file or a folder with such and such a word within its title EASILY.

    Find a file with such and such a word or phrase in it EASILY.  

    ("EASILY" would be defined as is found on Windows XP, not having to type in title: or name: or whatever--they just don't seem to always give me the universal search that I desire and thus I get frustrated and my valuable time is very much wasted!)

    I don't want to have to type the word in the search box, get ten million hits of both in the document and in the documents title, then have to figure out how do I limit my search.  I just want ot find files easily.  I am a researcher and there is much repition in the matter in the files that when I search I get too much information back.

    As has been said on this blog, Microsoft should give us less compliant users (i.e. us users with more valuable things to do with our time then figure out how to use such a complicated search engine and its terms) the means to do a search as Windows XP or others had (cf. Sunflower34) had.  

    I just need to find files quickly or find what is in files quickly.

    If I were a programmer for Microsoft--I am a medical doctor, not screwdriver--I would simply make a search box that would simply and easily find a file or folder as XP did and then gave the option of finding a word or words or a phrase in files.  

    WHY CANNOT MICROSOFT SIMPLY DO THIS FOR US USERS???  Talk about Ma Bell...

    My other serious problem with Vista: Several programs that ran under Windows 98, can't be run...  That also baffles me...  Hundreds of dollars wasted...

  9. Posted on: November 05, 2007 at 5:40AM  

    Still problems with search.

    A) Why I can´t sort search results by size?

    Sometimes it tries to sort but the result will not be Ascending nor Descending...

    Doing advanced search by name (string in name like "img" for photos or "clip" for videos) over portable (USB) or network drives (non-indexed). I will got results with different filetypes and filesizes. Now if I want to sort these results by size it never works!

    B) Why Vista search can't remember the view and columns I want to see in results? I allways shall again choose (additionally to name): detailed view, Sise, Date Modified, Type, and Folder Path. I will allways see these columns - why I can't configure my Vista (and Search) such way?

  10. Posted on: November 14, 2007 at 2:33PM  

    I just discovered this blog.  I am having all kinds of problems with searching with Vista.

    I have an application that brings in messages (thousands) in as .tmp files.  All I want to do is be able to find which one of those contains a string (like a name or particular SSN).  Search will NOT return any results, even though I'm looking right at them.

    I've discovered if I rename the file to .txt it works though, so I guess Vista is ignoring the .tmp file extension.

    So am I correct that my choices are:

    1)  Rename thousands and thousands and thousands of files just to be able to do a simple search.

    or

    2)  Copy all of the files up to my server that has Windows 2000 and use it's much superior search functionality.

    Is that right?  Is there really not any way to make Vista search these files?  I thought maybe if I associated the .tmp file extension with Notepad it would work, but apparently not.

    I guess I'm to the point where I just can't trust that Vista's search functionality is giving me valid results.

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