Advanced Windows Searches

Advanced Search

There is a great deal of confusion among people as to whether or not Vista Search works or not, and an even greater number of people that just don't use it because they don't know how, or are not aware of it's advanced facilities. This intention of this tutorial is to show people just how much more advanced Vista Search is, and how easy it is to fully utilize this great feature to it's full potential by making use of the Advanced Query Language.

Step One
Note   Note

For best results, you may want to download an install Windows Search 4.0 - Windows Search 4.0.


Setting up Vista Search
In order to use Vista Search correctly, your first need to have it index your entire computer. To do this, you need to change some settings in Indexing Options:

1. Open Control Panel


If you are using the default view of Control Panel, do the following:
A) Click On "System and Maintenance"

B) Click on "Indexing Options"

Or, if you are using the classic view Control Panel, locate and double-click the "Indexing Options" icon

2. Click the "Modify" button:

indexing_options.jpg

3. Click the "Show all locations" button. You will need to respond to a UAC prompt.

4. In the Indexed Locations window, you can modify which items will be included in the index by adding or removing the check marks for any given item. For best results though, it is best to check all available locations:

indexed_locations_fullview.jpg

5. Click "OK".

Because the indexing service will operate substantially slower while you are using the computer, you should leave the computer on for several hours so that indexing can complete quicker. Overnight is usually a good idea.

If you have made substantial changes to the Indexing settings, you may at this point want to follow the procedures in Step Two below so that the indexer can properly rebuild it's database from the start.

indexing_progress.jpg

6. When indexing is complete, click the "Close" button.


Step Two
Rebuilding the Search Index

If you have changed the settings for the indexer, or you find that searches sometimes include results for deleted files, then the index may need to be rebuilt:

1. Open Control Panel


If you are using the default view of Control Panel, do the following:
A) Click On "System and Maintenance"

B) Click on "Indexing Options"

Or, if you are using the classic view Control Panel, locate and double-click the "Indexing Options" icon

2. Click the "Advanced" button. You will need to respond to a UAC prompt.

3. Click the "Rebuild" button:

advanced_options_rebuild.jpg

4. You will be prompted "Are you sure you want to rebuild the index?". Click "OK" to rebuild the index, or "Cancel" to exit.

Because the indexing service will operate substantially slower while you are using the computer, you should leave the computer on for several hours so that indexing can complete quicker. Overnight is usually a good idea.

5. When indexing is complete, click the "Close" button.


Using Windows Vista Search
Finding Search

Now that you have your entire computer indexed, you can perform lightning fast searches with remarkably accurate results. There are a number of ways in which to access or invoke search:

1. If you have not yet installed Vista Service Pack 1, you can open Search by clicking on the Start button, then clicking "Search". The "Search" button was removed from the Start menu in Vista SP1, for various reasons.

2. Click the Start button, and begin typing your search query in the Search box

3. Use the <WINDOWS_KEY>+<F> keyboard shortcut to open search

4. Open a Windows Explorer window, and begin typing your search query in the Search box. Using this method will limit your search results to the currently selected folder and it's contents.

Basic Search Techniques
Generally speaking, Vista Search will locate all items that match the criteria you enter into the Search Box. When a search is completed, you can modify the results by using the interface elements of Windows Explorer to filter the results list down until you find what you want:


Show Only
You can filter the search to show All items, E-Mail, Documents, Pictures, Music or Other items by clicking the relevant filter at the top of the search window:

search_standardfilter.jpg

Column Headings
A hidden drop-down arrow will be made visible when you hover the mouse over the right edge of a header in Search Results. Clicking this arrow will present you with 3 global options, and a list of check boxes that varies depending on which header you clicked. The three global options are "Sort", "Group" and "Stack By".


If a particular column header that you want to use is not visible, then do the following:
A) Right-click on the headers and select the "More..." command

B) You can then show or hide whatever headers you want by adding or removing check marks from the items you want

C) Click "OK"

Note: Using the Column Headings to filter search results works in standard Windows Explorer views as well. You can use these techniques to filter a folder view to show only a subset of the files it contains:

search_header_dropdown.jpg

1. Sort
search_header_dropdown_sort.jpg

Clicking this command will sort the given search results. Clicking Sort again will reverse the results. The header currently being used for sorting is highlighted in a different color from the rest of the headers, with an arrow in the middle indicating the direction of the sort.

Using the Sort command will also stop grouping of results.

2. Group
search_header_dropdown_group.jpg

Clicking the Group command for any particular header will convienently group the results for you to make it easier to locate similar items. Each group will be labelled with the appropriate text, and will also include in brackets the number of items contained in that group. There are a number of actions that can be performed with groups:


search_header_dropdown_group_view.jpg
A) Clicking a group label will select all items in that group​
B) Clicking the arrow on the right-side of a group label will collapse or expand that group

C) Right-clicking on any group label will open a popup menu from which you can select the "Expand all groups" or "Collapse all groups" commands. Particularly if you have a lot of results to browse through, it is great being able to collapse all groups to make it easier to find the group you want. You can then click it's arrow to expand it again to reveal the items in that group.

3. Stack By

search_header_dropdown_stackby.jpg


The Stack By command is very similar to groups, except that the results are filtered down to single icons according to the header you clicked. To view the items contained in any given "stack", you need to double click it's icon. To return to the stack icons, click the Back button:

search_header_dropdown_stackby_view.jpg

Using the stacks system is useful if you're only interested in a single group of items, and you want to filter down your search results to only those items.

4. Headers

In addition to the "Sort", "Group" and "Stack by" commands, you will also be presented with a selection of filters that varies according to which header you clicked. These filters can be used to either drill down your results to a single set of results, or to a selection of various items.
A) Clicking on the label of a filter will close the dropdown and filter results down to that particular item. A check mark will appear at the right of that header, indicating that a filter is in effect for that header. To show all items again, click the check mark, then remove the check from the filter:

search_header_dropdown_selectfilter.jpg

B) Adding a check mark to a filter item will keep the drop down open, and will filter the results accordingly. You can add checks to as many filters as you wish. When you have filtered the results down as you want them, click anywhere outside of the drop down to close it:

search_header_dropdown_selectfilter_multi.jpg

Advanced Searches
Sometimes, you know exactly what type of item you are searching for, and using the standard filters can be cumbersome to filter the results down to what you want. By using the Advanced Query commands, you can not only improve the accuracy of results, but the many cases you can improve upon the speed at which results are returned by ignoring irrelevant information.

Because the Advanced Query Syntax is quite extensive, this tutorial will concentrate on only the most common that you are likely to use. For additional details, you can read the information provided by Microsoft by visiting the Windows Desktop Search: Advanced Query Reference website.

Common File Types
The standard search window allows you to filter results using the All, E-mail, Document, Picture, Music and Other filter commands along the top of the search window. The Other filter is a bit generic, and when used, still requires several clicks to filter the results down to the desired outcome.

To over come this, you can use the "kind:" operator to restrict your searches to a particular type of file. The "kind:" operator can use any of the following modifiers:

contacts or person
Searches your contacts


Example:
kay kind:contacts

Locates all contacts containing the word kay

corex kind:person

Locates all contacts containing the word corex

docs
Finds all documents, including amongst others, Word, Excel and Text documents.


Example:
service kind:docs

Locates all documents containing the word service

"windows vista" kind:docs

Locates all documents containing the exact phrase "windows vista"

music or song
Find all music


Example:
avril kind:music

Finds all music containing the word avril

"freddie mercury" kind:song

Finds all music containg the exact name "freddie mercury"

pics or pictures
Finds pictures


Example:
pompeo kind:pics

Finds all pictures with properties containing the word pompeo

"clark kent" kind:pics

Finds all pictures with properties containg the exact phrase "clark kent"

videos
Find videos


Example:
smallville kind:videos

Finds all videos with properties containing the word smallville

"Star Trek" kind:videos

Finds all videos with properties containing the exact phrase "star trek"

folders
Only finds folders that match your search


Example:
break kind:folders

Finds all folders containing the word break

"star trek" kind:folders

Finds all folders containg the exact phrase "star trek"

programs
Find only programs. The name of folders containing programs are also included in the search.


Example:
sims kind:programs

Finds all programs whose name contains the word sims

paint kind:programs

Finds all programs whose name contains the word paint

link
Find shortcuts. The name of folders containing the shortcuts ares also included in the search.


Example:
downloads kind:link

Finds all shortcuts with the word downloads in the name

"windows vista" kind:link

Finds all shortcuts with the exact phrase "windows vista" in the name

File Properties
A search can also be performed for very specific file properties:

title
Finds items where the title property contains the given text. If any items do not have a "Title" property, then the filename of that item is assumed to be the title.


Example:
title:"merry christmas"

Finds all items with the exact phrase "merry christmas" in the filename or the title property.

title:smallville

Finds all files with the word smallville in the filename or the title property

date
Searches for items that match the given date. All possible dates, such as created date, modified date or accessed date will be included in the search.


Example:
date:today

Find all files with todays date.

date:yesterday

Find all files with yesterdays date.

date:1/31/2008

Find all documents dated 1/31/2008

kind:pics datecreated:5 december 2007

Finds all pictures that where created on 5 December 2007

Note:
When using the date parameter, you should enter date values according to the Short Date Format in Regional and Language Options of Windows. The default layout for the Short Date format for English (United States) is "M/d/yyyy". If you have customized this layout, then dates must be entered in that format.


size
Searches for items that match the given size, which by default is specified in bytes.


Example:
size:10

Find all files that are 10 bytes in size

size:10000

Find all files that are 10000 bytes in size

The "size" search operator can be further refined by adding the KB, MB, GB or TB units specifiers.


Example:
size:10kb

Finds all files that are 10KB in size

size:30mb

Finds all files that are 30MB in size

subject
Searches for items where the subject matches the given text.


Example:
subject:exclusive

Finds all files with the word exclusive in the subject

subject:hollywood

Finds all files with the word hollywood in the subject

to or from
These two operators will search for e-mail that was sent to or from the specified person.


Example:
from:dillon

Finds all received emails with the word dillon in the sender name

from:cameron

Finds all received emails with the word cameron in the sender name

to:"corex accounts"

Finds all emails that where sent to people with the phrase "corex accounts" in the name

to:nigel

Finds all emails sent to people with the word nigel in the name

ext
Searches for files with the specifed text in the filename extension.


Example:
ext:txt

Finds all files with txt in the extension

ext:doc

Files that use and extension of doc or docx will be returned in the results.

ext:"psp"

Only files with an extension of psp will be returned in the results. file that use pspimage or pspcache will not be displayed in the results.

folder
The search will only return results for files contained in the specified folder.

Example:
folder:smallville
Finds all files that are contained within a folder named smallville​
folder:games
Finds all files that are contained within a folder named games​
Combination Searches
The operators shown above can very easily be combined to further refine your searches.


Example:
"clark kent" kind:pics size:300kb

Find all pictures with properties containg the phrase "clark kent" that are at least 300KB in size.

kind:email subject:adsl from:nigel

Find all email from people with nigel in their name and with a subject containing the word adsl

kind:music album:"under my skin"

Find all music files with an album name containing the complete phrase "under my skin"

kind:pics date:lastmonth

Find all pictures that where created, modified or accessed last month. Other dates, such such date aqcuired or date taken will also be included in the search.

kind:pictures folder:"source images" folder:sport

Find all pictures, but restrict results to files in folders containing the phrase "source images" and the word sport. Results will be returned for files in:

D:\Wallpapers\Sport\Tennis\Ana Ivanovic\Source Images

D:\Wallpapers\Sport\Tennis\Maria Sharapova\Source Images


but not:​
D:\Wallpapers\Music\Avril Lavigne\Source Images

D:\Wallpapers\Sport\Tennis\Ana Ivanovic

D:\Wallpapers\Sport\Tennis\Maria Sharapova

D:\Wallpapers\Women\Isabeli Fontana\Source Images


Search Ranges and Boolean Operators
Additional modifiers can be added to the above operators to specify specific ranges for the search, or to exclude certain items. These modifier are:

> (Greater Than), < (Less Than), >= (Greater Than or Equal To) or <= (Less Than or Equal To)
The <, >, >= and <= modifiers will mostly be used with searches involving numbers, such as file sizes or dates. They are used to indicate that the search must return results that fall within the specified range.


Example:
kind:pics date:>1/1/2008 date:<1/31/2008

Finds all files with dates after 1/1/2008 and before 1/31/2008. The specified dates will not be included in the results

kind:docs date:>=3/1/2008 date:<=3/15/2008

Finds all files with date between 3/1/2008 and 3/15/2008, inclusively. The specified date will be included in the search.

ext:"txt" size:<5KB

Finds all files with and extension of "txt" that are less than 5KB in size.

size:>10GB

Finds all files that are larger than 10GB

AND or +
The AND modifier indicates that the results must contain both the text items specified. When using the AND modifier in its word form, it must be specified in all uppercase.


Example:
kind:pics smallville AND luthor

Finds all pictures with properties containing both the words smallville and luthor

artist:enya + mario

Finds all files with an artist property containg the both the words enya and mario

NOT or -
The NOT modifier indicates that results must be returned that contain the first specified item, but not the second. When using the NOT modifier in its word form, it must be specified in all uppercase.


Example:
avril NOT barker kind:music

Finds all music files where the properties contain the word avril, but not barker

smallville kind:pics luthor - lex

Finds all picture file wher the properties contain the word luthor, but not lex

"" (Quotes)
By enclosing a specific phrase within double quotes, the search results must contain the exact phrase specified


Example:
kind:music album:"under my skin"

Find all music files with an album name containing the complete phrase "under my skin"

"lex luthor"

Find all files where the properties contain the exact phrase "lex luthor"

Advanced Query Reference
Following is a summary of the syntax keywords, operators and modifiers that you can use with Windows Vista Search.

Common File Properties
The following modifiers are used in conjunction with the "kind:" operator:

communications, contacts, person, email, im, meetings, tasks, notes, docs, music, song, pics, pictures, videos, folders, foldername, programs, tv, link, journal

Properties For All Files
title, subject, about, status, date, datemodified, modified, importance, priority, size, deleted, isdeleted, isattachment, to, toname, cc, ccname, company, category, keywords, album, filename, file, genre, author, by, folder, under, path, ext, fileext, filename, file, tag, keyword, type

Documents
comments, lastsavedby, documentmanager, revisionnumber, datelastprinted, slides

Music
bitrate, artist, year, duration, album, genre, lyrics, track, year

Picture
cameramake, cameramodel, dimensions, orientation, taken, datetaken, width, height, flashmode

Video
name, subject, ext, filext

Recorded TV
broadcastdate, channel, closedcaptioning, daterelased, episodename

Contacts
jobtitle, imaddress, assistantphone, assistantname, profession, nickname, spouse, businesscity, businesspostalcode, businesshomepage, callbacknumber, carphone, children, firstname, lastname, homefax, manager, pager, businessphone, homephone, mobilephone, officelocation, anniversary, birthday

Communications
from, organizer, received, sent, subject, title, hasattachment, hasattachments, attachments, attachment, bcc, bccname, bccaddress, ccaddress, cc, flagstatus, toaddress, to, duedate, due, read, isread, iscompleted, incomplete, hasflag, isflagged, duration

Calendars
isrecurring, recurring, organizerm by, from, location

Dates
In addition to entering absolute dates with the "date:" operator, you can also use the following modifiers to specify dates:

today, tomorrow, yesterday, thisweek, nextmonth, lastweek, pastmonth, comingyear, lastyear, sunday, monday, tuesday, wednesday, thursday, friday, january, february, march, april, may, june, july, august, september, october, november, december

Numbers
When using the "size:" operator searching for file sizes, the number you enter is usually specified in bytes if no additional modifiers are added. You can use standard file size notation when entering file sizes:

kb, mb, gb, tb

Related Tutorials
Folder Sorting
 

Attachments

  • thumb_search_icon.jpg
    thumb_search_icon.jpg
    10.2 KB · Views: 416
Last edited by a moderator:
I'm trying to locate all files with "(2)" but NOT include any with just a 2 in the filename. The query seems to ignore the parentheses and the results include all with a 2 and not just those with a (2). Is there any way to query for this? I'm trying to use this to identify duplicate files (which have been named with the (2) appended to the filename) but can't find a query that will isolate them from files that just include a 2 somewhere in the filename (without the parentheses). Is this possible with Vista Search?

Thank you!
 

My Computer

System One

  • Manufacturer/Model
    Dell Inc. MP061 Inspiron E1705
    CPU
    2.00 gigahertz Intel Core 2 Duo 64 kilobyte primary memory
    Motherboard
    Board: Dell Inc. 0YD479 Bus Clock: 166 megahertz
    Memory
    2046 Megabytes Usable Installed Memory
    Graphics card(s)
    ATI Mobility Radeon X1400 (Microsoft Corporation - WDDM) [Di
    Sound Card
    SigmaTel High Definition Audio CODEC
    Monitor(s) Displays
    Generic PnP Monitor (17.2"vis)
    Screen Resolution
    1920 x 1200 pixels
    Hard Drives
    Hitachi HTS541616J9SA00 [Hard drive] (160.04 GB) -- drive 0, s/n SB2411SJGLLRMB, rev SB4OC74P, SMART Status: Healthy
    Case
    Chassis Serial Number: 5YK95C1
    Mouse
    Logitech HID-compliant Cordless Mouse
    Keyboard
    Standard PS/2 Keyboard
    Internet Speed
    1958 Kbps download ; 754.8 Kbps upload
    Other Info
    Optiarc DVD+-RW AD-5540A ATA Device [CD-ROM drive] Dell AIO Printer A940 Conexant HDA D110 MDC V.92 Modem 6TO4 Adapter Broadcom 440x 10/100 Integrated Controller Broadcom 802.11n Network Adapter Microsoft ISATAP Adapter Teredo Tunneling Pseudo-Interface Router Linksys / WRT54G -01
Back
Top