Configuring Offline Files Indexing Indexing of offline content in the CSC store is enabled by default, but you can disable it by using Indexing Options in Control Panel or by using Group
Trang 1FIgURE 19-4 Modifying the locations that are indexed
For example, to index the entire system volume, select the check box for this volume (usually C) This adds the system drive to the list of start addresses for the indexer, with the following default exclusions: ProgramData, Data, AppData, Windows, and CSC You can override these exclusions by making hidden and system files visible in Windows Explorer and then clicking Show All Locations (as shown in Figure 19-4), expanding the sys-tem volume in the folder tree, and selecting each excluded folder This is not recommended, however, because adding program and operating system files to the index can slow search queries and degrade the search experience for users In addition, if the FANCI bit is set on a directory, the directory will appear dimmed, and when you point to it, additional info will be displayed on how to index the contents of that directory (see Figure 19-5)
Trang 2FIgURE 19-5 Indexing a hidden system folder
Configuring Indexing Scopes and Exclusions Using Group policy
To specify locations to be indexed by using Group Policy, enable the following policy setting for targeted computers:
Computer Configuration\Policies\Administrative Templates\Windows Components\Search
\Default Indexed PathsThen configure this policy by specifying the local file system paths for the volumes and directories that you want to include as indexed scopes on the targeted computers
To specify locations to be excluded from indexing by using Group Policy, enable the following policy setting for targeted computers:
Computer Configuration\Policies\Administrative Templates\Windows Components\Search
\Default Excluded PathsThen configure this policy by specifying the local file system paths for the volumes and directories that you want to exclude from being indexed on the targeted computers
Trang 3note Users whose computers are targeted by these two policy settings can override
them manually using Indexing Options in Control panel For example, a location that is indexed because of the first Group policy setting can be excluded manually from being indexed by the user Similarly, a location that is excluded from being indexed because of the second Group policy setting can be included for indexing manually by the user.
Configuring Offline Files Indexing
Indexing of offline content in the CSC store is enabled by default, but you can disable it by using Indexing Options in Control Panel or by using Group Policy Only the entire per-user offline cache can be indexed—individual files within the cache cannot be included or excluded from being indexed
Configuring Offline Files Indexing Using Control panel
To disable indexing of the Offline Files cache using Indexing Options in Control Panel, follow these steps:
1. Click Modify to open the Indexed Locations dialog box
2. Clear the check box labeled Offline Files The preceding procedure disables indexing of offline files for the current user To disable indexing of offline files for a different user of the computer using Indexing Options in Control Panel, follow these steps:
1. Click Modify to open the Indexed Locations dialog box
2. Click Show All Locations and respond to the UAC prompt
3. Clear the check box for the particular user’s Offline Files cache
note To disable offline files indexing for all users of a computer, you must disable it
using Group policy, as explained in the next section.
Configuring Offline Files Indexing Using Group policy
Using Group Policy, you can disable indexing of offline files only for all users of the computer, not for a particular user To disable indexing of offline files for all users, enable the following policy setting for targeted computers:
Computer Configuration\Policies\Administrative Templates\Windows Components\Search
\Prevent Indexing Files In Offline Files Cache
Trang 4Configuring Indexing of Encrypted Files
Indexing files encrypted using EFS are disabled by default in Windows 7, but you can enable them by using Indexing Options in Control Panel or by using Group Policy Beginning with Windows 7, indexing the contents of encrypted files is supported, which makes searching en-crypted content as easy as searching unencrypted content (In Windows 7, the non-encrypted properties of a file are always indexed, regardless of whether the file itself is encrypted ) The only limitation is that users can search only encrypted content stored on the local file systems
of their computers, not encrypted content stored on network shares Prior to Windows Vista SP2, only encrypted files that were made available for offline use could be indexed
iMpoRtAnt If you decide to enable indexing of encrypted content on a computer
run-ning Windows 7, Microsoft recommends that you use Windows BitLocker Drive Encryption
to encrypt the disk volume on which the index resides on your computer Microsoft does not recommend using EFS to encrypt the index.
Configuring Indexing of Encrypted Files Using Control panel
To enable indexing of encrypted files using Indexing Options in Control Panel, follow these steps:
1. Click Advanced to open the Advanced Options properties dialog box
2. Select the Index Encrypted Files check box
3. If the disk volume where the index resides is not yet protected by Windows BitLocker, the following warning dialog box is displayed:
4. Click Continue to enable the indexing of encrypted content on your computer
5. If you use a smart card to access encrypted files, a balloon notification appears above the notification area, indicating that EFS needs your smart card personal identification number (PIN) Clicking this notification opens a Windows Security dialog box in which you can type the PIN for your smart card
Trang 5iMpoRtAnt Selecting or clearing the Index Encrypted Files check box rebuilds the index
immediately Depending on how many files you have, this can take up to several hours to complete, and searches might be incomplete while the index is being rebuilt.
Configuring Indexing of Encrypted Files Using Group policy
To enable indexing of encrypted files using Group Policy, enable the following policy setting for targeted computers:
Computer Configuration\Policies\Administrative Templates\Windows Components\Search
\Allow Indexing Of Encrypted Files
If you enable this policy setting, indexing disregards encryption flags (although access restrictions still apply) and attempts to decrypt and index the content If you disable this set-ting, the Windows Search service (including third-party features) should not index encrypted items, such as files or e-mails, to avoid indexing encrypted stores
Configuring Indexing of Similar Words
By default, words that differ only in diacritics (accents) are considered the same word by the indexer (at least for English and some other languages) If you want such words to be treated
as different words by the indexer, you can use Indexing Options in Control Panel or you can use Group Policy Note that changing this policy results in a full rebuild of the index because
it changes the internal structure of the content index
note The default setting for how diacritics are handled varies by language For example,
the default is Off in English, but it is On in several other languages.
Configuring Indexing of Similar Words Using Control panel
To cause words that differ only in diacritics to be indexed as different words using Indexing Options in Control Panel, follow these steps:
1. Click Advanced and respond to the UAC prompt to open the Advanced Options properties dialog box
2. Select the Treat Similar Words With Diacritics As Different Words check box
Configuring Indexing of Similar Words Using Group policy
To cause words that differ only in diacritics to be indexed as different words using Group Policy, enable the following policy setting for targeted computers:
Computer Configuration\Policies\Administrative Templates\Windows Components\Search
Trang 6Configuring Indexing of Text in TIFF Image Documents
New in Windows 7 is the ability for users to search for text within TIFF image documents that are compliant with the TIFF 6 0 specification This capability uses Optical Character Recognition (OCR) processing and is not enabled by default
iMpoRtAnt Enabling the indexing of text in TIFF image documents can result in
signifi-cant processing overhead.
Configuring Indexing of Text in TIFF Image Documents Using Control panel
To enable the indexing of text in TIFF image documents manually on a computer running Windows 7, perform the following steps:
1. Open Control Panel, click Programs, and then click Turn Windows Features On Or Off
2. Select the Windows TIFF IFilter check box and click OK
3. Rebuild the index if you have existing TIFF image documents in the indexing scope on your computer
note If your TIFF image documents are stored on a computer running Windows Server
2008 R2, you can use the add Features Wizard to add the Windows TIFF IFilter feature so you can enable the indexing of text in TIFF image documents stored on the server.
Configuring Indexing of Text in TIFF Image Documents Using Group policy
You can use Group Policy to configure how indexing text in TIFF image documents takes place The applicable policy settings are found under:
Computer Configuration\Policies\Administrative Templates\Windows Components\Search
\OCR\
The policy settings for configuring the indexing of text in TIFF image documents are as follows:
n Force TIFF IFilter To Perform OCR For Every Page In A TIFF Document Lets users
turn off the performance optimization so that the TIFF IFilter performs OCR for every page in a TIFF document, which allows indexing of all recognized text By default, the TIFF IFilter optimizes its performance by skipping OCR for document pages that have non-text content (such as photos) In some cases, pages that contain text can be misclassified as non-text pages If this is the case, the text in these pages will not be indexed
Trang 7If you enable this setting, TIFF IFilter will perform OCR for every page in a TIFF ment to index all recognized text Therefore, the OCR process will be slower This decrease in performance can be significant if there are a great deal of non-text pages
docu-in TIFF documents on the system
If you disable or do not configure this setting, TIFF IFilter optimizes its performance by skipping non-text content during the OCR process
n Select OCR languages From A Code Page This policy setting allows the selection
of OCR languages that belong to one of the supported code pages If you enable this policy setting, the selected OCR languages are used in OCR processing during the indexing of TIFF files The default system language is ignored unless it is among the selected OCR languages If you disable or do not configure this policy setting, only the default system language is used
All selected OCR languages must belong to the same code page If you select languages from more than one code page, the entire OCR language selection is ignored and only the default system language is used
Re-indexing is not initiated when you enable this policy and select OCR languages This policy setting applies only to the indexing of new files unless re-indexing is initiated manually
Other Index policy Settings
Table 19-5 lists some additional policy settings for configuring indexing in Windows 7 All the policy settings listed in this table are found in the following location:
Computer Configuration\Policies\Administrative Templates\Windows Components\Search
For detailed information concerning all policy settings for indexing, see the Windows Server 2008 R2 and Windows 7 Group Policy Settings Reference, which can be obtained from the Microsoft Download Center at http://www.microsoft.com/downloads/.
Policy settings for configuring the user search experience for Windows Explorer in Windows 7 are described in the section titled “Using Search” later in this chapter
TABlE 19-5 Additional Group Policy Settings for Windows Search
Microsoft Office Outlook
Enabling this policy setting prevents the indexing of all Outlook items, including messages, contacts, calendar items, notes, and
so on
Trang 8Prevent Displaying Advanced Indexing Options In The Control Panel
Enabling this policy setting will prevent users of targeted computers from being able to open Indexing Options in Control Panel to locally configure search and indexing settings on their computers
diReCt FRoM tHe SoURCe
Indexing and libraries—Hard Disk Drives vs Removable Storage
anton Kucer, Senior program Manager
Windows Experience Find & Organize Team
In Windows 7, hard disk drives appear in the Hard Disk Drives location in Windows Explorer Typical devices in this category include internal and external hard drives Examples of external hard drives are drives connected via a USB, FireWire, or ESaTa cable to an external port on a pC all drives that appear under Hard Disk Drives and are formatted as NTFS, FaT, FaT32, or exFaT can be included in a library and added
to the indexer.
By contrast, devices with removable storage appear in the Devices With Removable Storage category in Windows Explorer Typical storage devices in this category include DVD drives, CD drives, flash card readers, and USB flash drives This category
is intended to represent devices that have media that can be removed However, not all devices accurately report supporting removable media as a result, it is common
to see devices in this category that do not have removable media, such as USB flash drives or portable media players such as a Zune or an ipod Drives or media that appear under Devices With Removable Storage cannot be added to a library or added to the indexer.
Understanding Drive letter Assignment Rules
To simplify the description of how drive letter assignment rules work, only the following devices are considered: devices that can be externally connected to a
pC, require only one drive letter, and are not floppy disk, CD, or DVD drives For
a complete description of drive letter assignments, see the following:
http://support.microsoft.com/kb/234048.
Trang 9When a device that will be assigned a drive letter is attached to Windows for the first time, it is assigned the next available letter (that is, one that is not currently being used for an attached device or resource) starting with C If the drive is removed and then reattached, Windows assigns the same drive letter unless that drive letter has been recycled for use with a different device or resource If the drive letter has been recycled, the device once again is assigned the next available drive letter starting with C.
For example, let‘s say that before any external devices are attached, the computer has two hard disk drives (C and D) and a DVD/CD-RW drive (G) When an external drive is plugged in for the first time, the lowest available drive letter (E) is assigned
to External Drive 1 If External Drive 1 is unplugged and External Drive 2 is plugged
in, drive letter E is recycled and assigned to External Drive 2 If External drive 1 is then plugged back in again, it is assigned a new drive letter, F.
as long as drive letters are not recycled (for example, due to a new device being plugged in while one of the other devices is unplugged), both external drives can be removed and added in any order and they maintain their current drive letters For example, if both external drives are removed and then External Drive 1 is plugged back in, it is still assigned the drive letter F.
Drive letter Assignment and Its Impact on Indexing
The indexer does not support tracking indexed locations via a unique ID Indexed locations are just tracked via their Uniform Resource Identifier (for example, file:///
F:\Music) The indexer has the following limitations when it is indexing a location on
a drive and the drive letter changes:
n When a drive letter changes, the indexer does not have the ability to cally update the path information for indexed items For example, if the location E:\Music from External Drive 1 is added to the indexer and External Drive 1 is later assigned the drive letter F, the indexer does not recognize F:\Music as a location that should be indexed Instead, it maintains the old index scope, E:\Music.
dynami-n When the drive letter is assigned to a new drive, the indexer is able to detect that content has changed If the new drive is supported, it removes all indexed content from the old drive and attempts to index the new drive.
Drive letter Assignment and Its Impact on libraries
Libraries also do not support tracking locations that have been added to them via
a unique ID However, they do store additional information about locations, such as creation time, and they have link tracking functionality that can use this information
to resolve locations in many cases when drive letters have changed, as follows:
Trang 10n Link tracking can resolve locations in cases in which folders are added to a library and drive letters have changed as a result When this occurs, the library is updated to point to the new location (for example, E:\Music gets updated to F:\Music) additionally, the library notifies the indexer to remove the old location (in this case, E:\Music) and add the new location (F:\Music).
n Libraries do not resolve locations when drive letters change after the root of a drive has been added to a library.
Behavior When a Drive Is Not Available
When an external drive is no longer available (for example, it is unplugged from the computer) after a location from the drive has been added to a library and the in- dexer and the drive letter have not been recycled, the indexer trims any results from that location for any queries that are sent to it The indexing control panel shows the location as being indexed but identifies it as unavailable.
Best Practices for Using External Hard Drives with libraries
Best practices when using external hard drives with libraries include:
n attaching all drives that you will use with the computer at the same time prevents the recycling of drive letters.
n Do not add a device that is assigned a or B drive letters to a library The indexing of these drive letters is not supported and prevents the addition of these locations to a library Note that Windows 7 will never automatically assign drive letter a or B to an external drive You would need to have manually forced assignment of these drive letters (for example, via the Disk Management console).
Mitigating Drive letter Recycling
The resolutions given previously, in which you need to manually remove a location and then add a location back to resolve issues caused by drive letter recycling, need
to be done only once in most cases However, after the root of a drive is added to a library, there can be situations in which its drive letter is continually recycled For example, suppose that a user has two external hard drives that are never attached to the computer at the same time One hard drive (External Drive 1) is attached to the laptop only when the user is at work, and the other hard drive (External Drive 2) is attached to the laptop only when the user goes home When External Drive 1 is plugged in, it is assigned drive letter E; and whenever External Drive 2 is plugged in, it is also assigned drive letter E So if E\ from External Drive 1
is added to a library, every time External Drive 2 is plugged in, it shows up in the library instead Each time this occurs, the indexer ends up re-indexing the entire drive.
Trang 11One solution for this problem is to plug both drives into the system at the same time If this isn’t possible, the other solution is to manually assign a higher drive letter to one or both of the drives For example, using the Disk Management con- sole, you could assign the drive letter S to External Drive 2 picking a high drive let- ter significantly reduces the possibility that the drive letter will be recycled picking
a letter in the middle of the alphabet is best because Windows assigns drive letters from the end of the alphabet for mapped drives by default.
Using Search
Managing the search experience for users mainly requires educating them about the powerful new search capabilities built into Windows 7 The sections that follow provide an overview of these search capabilities and how to configure the search experience for users using Group Policy
Configuring Search Using Folder Options
With the new Search tab found in Folder Options in Control Panel (see Figure 19-6), users can configure different aspects of the Windows Search experience to meet their needs, including what to search, how to search, and what should happen when searching nonindexed loca-tions within Windows Explorer
Trang 12Configuring What to Search
By default, Windows 7 Search is configured to search for both file names and the contents of files when searching indexed locations When searching nonindexed locations, only file names
are searched For example, searching the %Windir% folder for log will return all files and
sub-folders under %Windir% that satisfy any of these conditions:
n The files are named “log” or “Log” (the function is case insensitive)
n The file names use log as a prefix This means, for example, that searching for log might return logger, logarithm, or even fire-log (the hyphen acts as a word separator), but it won’t return blog or firelog because these file names do not have log as a prefix
n The files have the log file extension
To perform such a search, open Windows Explorer, select the C:\Windows directory in
the navigation pane, and type log in the Search box at the upper-right part of the window
(see Figure 19-7) Note that the %Windir% folder is not indexed by default, so searching this folder is slow because it uses the grep method instead of the Windows Search service (This method was used by the Search Assistant in Windows XP ) On the other hand, searching the user’s Documents library returns results almost instantaneously because the user’s Documents library is indexed by default and the Windows Search service simply has to query the catalog
to obtain the results
FIgURE 19-7 Results of searching the nonindexed %Windir% directory for the search string log
By selecting Always Search File Names And Contents (This Might Take Several Minutes) under What To Search on the Search tab of the Folder Options window, users can modify this default search behavior so that Windows searches for both file names and the contents of files, even when searching locations that are not being indexed Note that doing this can slow down the search process considerably for such locations A better approach is to mark these
Trang 13locations for indexing As shown in Figure 19-7, searching a nonindexed folder using Windows Explorer causes a yellow notification bar to be displayed that says “Searching might be slow
for nonindexed locations: foldername Click to add to index ” By clicking this notification bar
and selecting Add To Index, users can cause the selected folder to be added to the indexing scope on their computer
Configuring How To Search
The following options configure how searching is performed:
n Include Subfolders In Search Results When Searching In File Folders This option
is enabled by default and causes Windows to search within subfolders when you search from any Windows Explorer window Clearing this option will cause Windows to search only within the selected folder
n Find Partial Matches This option is enabled by default and causes Windows to
display results as you type your search For example, if you type fi in the Search box
on the Start menu, one of the results returned will be “Windows Firewall” because the
second word in this program name begins with fi If you disable this option, however,
you will need to type the entire word Firewall before it will be displayed in your search
results
n Use Natural language Search Selecting this option causes Windows to interpret
the search string as natural language For example, searching for “e-mail from Karen”
would return all mail messages received from users named Karen
n Don’t Use The Index When Searching In File Folders For System Files (Searches Might Take longer) Selecting this option causes Windows to always use the slower
grep method for searching file names The contents of files are not searched when this
is selected and the setting Always Search File Names And Contents (Might Be Slow) is also selected
Configuring What Happens When Searching Nonindexed Locations
Users can enable the following search behaviors when they search nonindexed locations:
n Include System Directories Selecting this option causes system directories to be
included when searching a volume or folder using the grep method of searching Note that beginning with Windows 7, this option is selected by default
n Included Compressed Files (zIP, CAB…) Selecting this option causes compressed
files to have their contents searched both for matching file names and matching tent within these files
Trang 14con-Using Start Menu Search
Start Menu Search has been enhanced significantly in Windows 7 compared with how it was implemented in Windows Vista These numerous enhancements now make Start Menu Search
a universal entry point that users can use to find programs, settings, and files quickly and easily For example, in Windows Vista, the results from Start Menu Search were hard-coded into four groups: Programs, Favorites And History, Communications, and Files Beginning with Windows 7, however, these groups have changed to include Control Panel, Libraries, and all indexed locations, with Programs and Control Panel having the highest priority and with Favorites And History and Communications removed altogether For example, Figure 19-8
shows a Start Menu Search for the string remote that returns two programs, several Control
Panel items, and a number of documents and other types of files
FIgURE 19-8 Start Menu Search now returns Programs, Control Panel items, and other types of files
Clicking a group heading now returns all search results for that group For example, Figure 19-9 shows that clicking the Documents heading opens Windows Explorer and displays the search results returned from the Documents library for this search string
Using the Start menu is now the best way to find a particular Control Panel setting quickly For example, if you want to change the display settings on your computer, simply type
display in the Start Menu Search box, and the setting you are looking for is usually one of
the results listed Figure 19-10 illustrates that items listed in the Control Panel group of Start Menu Search results include not only Control Panel utilities, such as the Display applet, but also Control Panel actions, such as Change Display Settings This enhancement makes using Start Menu Search a much faster way to find configuration settings for your computer than browsing Control Panel
Trang 15FIgURE 19-9 Clicking the Documents heading returns all documents that contain the string remote in the
file name or document contents
FIgURE 19-10 Searching how to change display settings using Start Menu Search
Trang 16Re-scope links can be displayed at the bottom of the Start Menu Search results to allow users to re-scope their search to other locations quickly In Figure 19-10, the re-scope link See More Results is pinned by default, and clicking this link opens Windows Explorer and reruns the query against all indexed locations Up to three additional re-scope links can be pinned to the Start menu using Group Policy You can pin the following types of re-scope links:
n Search The Internet Reruns the query using the default Web browser and the
default search engine
n Custom library link Reruns the query against the specified library using Windows
Explorer
n Search connector link Reruns the query against the specified federated location via
a search connector using Windows Explorer
n Custom Internet search site link Reruns the query against a specified Internet or
intranet site that supports the OpenSearch standard using the default Web browserThe following Group Policy settings are new in Windows 7 and are used to pin or unpin re-scope links to the Start menu:
n Add Search Internet link To Start Menu Allows users to re-scope searches to their
default Internet search engine when searching from the Start menu This policy setting
is found in the following location:
User Configuration\Policies\Administrative Templates\Start Menu And Taskbar
n Pin Internet Search Sites To The “Search Again” links And The Start Menu
Allows users to resend searches to customized Internet or intranet sites from Windows Explorer and the Start menu This policy setting is found in the following location:User Configuration\Policies\Administrative Templates\Windows Components\Windows Explorer
n Pin library And Search Connectors To The “Search Again” links And The Start Menu Allows users to re-scope searches to customized Library or Search Connector
locations from Windows Explorer and the Start menu This policy setting is found in the following location:
User Configuration\Policies\Administrative Templates\Windows Components\Windows Explorer
n Remove See More Results/Search Everywhere link Hides the See More Results/
Search Everywhere link on the Start menu This policy setting is found in the following location:
User Configuration\Policies\Administrative Templates\Start Menu And Taskbar
MoRe inFo For additional information on how Start Menu Search works in Windows 7
and the groups of results that can be displayed, see the Windows Search, browse, and
Organize Administrator‘s Guide found on Microsoft TechNet at http://technet.microsoft.com /en-us/library/dd744681.aspx.
Trang 17Docu-n The user‘s own My Documents folder (included by default)
n The Public Documents folder on the user‘s computer (included by default)
n Additional volumes or folders on the user‘s computer
n Shared folders on the network Libraries are integrated fully in Windows 7 with fast, full-content search and provide cus-tomized filter search suggestions based on the types of files the library contains Figure 19-11 shows the Documents library on a user‘s computer where one of the library locations is the network share \\SEA-DC1\Documentation
FIgURE 19-11 This Documents library includes files located on a network share
Typing a search string into the search box in the upper right section of Windows Explorer searches the Documents library for the text specified As Figure 19-12 shows, the results returned include highlighting of file names that contain the search string and snippets of text from documents that contain the search string
Trang 18FIgURE 19-12 Results returned when searching the Documents library
As Figure 19-12 shows, clicking within the Search box allows you to use filters to narrow your search for documents that have a specific Author, Size, Date Modified, or Type Figure 19-13 shows that a history of previously tried queries is also displayed to allow you to rerun a query quickly if you want
FIgURE 19-13 Narrow your search using search filters or rerun a previous query
The search filters displayed vary depending upon the type of library being searched For example, searching the Music library provides search filters for searching by Album, Artist, Genre, or Length Search filters are a new feature in Windows 7 that make it easier for users
to construct queries using AQS, which could only be entered manually when creating search strings in Windows Vista For more information on AQS, see the sidebar “How It Works: Ad-vanced Query Syntax“ later in this chapter
Trang 19Once you perform a search, you can save it so you can run it again in the future To save your search, click the Save Search button on the toolbar Windows automatically suggests a name for your saved search based on your search string and any filters you selected Figure
19-14 shows a saved search named config type=.doc sizelarge.search-ms, whose name was
constructed as follows:
n Search string: “config”
n Type: doc file (Microsoft Office Word document)
n Size: large (1–16 MB)
FIgURE 19-14 Saving a search as a * search-ms file
Saved searches are saved by default in the Searches subfolder of your user profile and have
.search-ms as their file extension Saved searches are displayed under Favorites in the
naviga-tion pane of Windows Explorer To rerun a saved search, simply select it in Windows Explorer (as shown in Figure 19-15)
Trang 20If searching the Documents library doesn‘t return the result you are looking for, you can broaden your search focus to other libraries, the entire computer, or even the Internet by selecting one of the re-scope links shown at the bottom of your search results For example,
by clicking the Computer link, you can re-scope your search to files stored in any location on your computer (as shown in Figure 19-16) You can even define a custom scope for this search only by clicking the Custom link and specifying the locations, both local and network, that you want to search
FIgURE 19-16 You can broaden the focus of your search to your entire computer or other locations using re-scope links
note To quickly search all indexed locations on a computer running Windows 7, press
the Windows Logo key+F and type your search string Other methods for doing this clude pressing Ctrl+F from any Windows Explorer window and clicking Start, followed by pressing F3.
in-The re-scope links displayed at the bottom of the search results in Windows Explorer can
be customized by administrators using Group Policy The following Group Policy settings are new in Windows 7 and are used to customize the re-scope links displayed in Windows Explorer:
n Pin Internet Search Sites To The “Search Again” links And The Start Menu
Allows users to resend searches to customized Internet or intranet sites from Windows Explorer and the Start menu This policy setting is found in the following location:User Configuration\Policies\Administrative Templates\Windows Components\Windows Explorer
Trang 21n Pin library And Search Connectors To The “Search Again” links And The Start Menu Allows users to re-scope searches to customized library or Search Connector
locations from Windows Explorer and the Start menu This policy setting is found in the following location:
User Configuration\Policies\Administrative Templates\Windows Components\Windows Explorer
n Remove The Search The Internet “Search Again” Button Blocks access to Internet
search from Windows Explorer This policy setting is found in the following location:
User Configuration\Policies\Administrative Templates\Windows Components\Windows Explorer
Also new in Windows 7 are the following Group Policy settings, which can be used to configure further how search results are displayed:
n Turn Off The Display Of Snippets In Content View Disables the showing of
snip-pets of file contents when search results are returned This policy setting is found in the following location:
User Configuration\Policies\Administrative Templates\Windows Components\Windows Explorer
n Turn Off Display Of Recent Search Entries In The Windows Explorer Search Box Prevents the display of recent searches and prevents search strings from
persisting in the user portion of the registry This policy setting is found in the ing location:
follow-User Configuration\Policies\Administrative Templates\Windows Components\Windows Explorer
n Turn Off Numerical Sorting In Windows Explorer Causes Windows Explorer to
use logical file name sorting, as in previous versions of Windows This policy setting is found in the following location:
User Configuration\Policies\Administrative Templates\Windows Components\Windows Explorer
MoRe inFo For more information concerning libraries and how to manage and work
with them, see Chapter 15 For additional information on using Group policy to manage
searching in Windows 7, see the Windows Search, browse, and Organize Administrator‘s
Guide found on TechNet at http://technet.microsoft.com/en-us/library/dd744681.aspx.
Trang 22HoW it WoRKS
Advanced Query Syntax
AQS is a syntax used for creating complex search queries using the Search feature of Windows 7 aQS is not case sensitive (except for the Boolean opera- tors aND, OR, and NOT) and uses the implicit aND when multiple search terms are specified Supported syntax includes the following:
n Logical operators aND (or + prefixed to term), OR, and NOT (or <;$MI> fixed to term) plus parentheses for grouping (No assumption should be made about the relative precedence between AND, OR, and NOT, so parentheses should always be used to make queries unambiguous.)
pre-n Individual words By default partial matches are accepted, so a query sea will return items with “sea”, “seal”, “Seattle”, etc partial matches will always be ac- cepted, even when the Find partial matches setting is off, if a word ends with
a wildcard character (*) Thus a query sea* will always return items containing any word beginning with “sea” Multiple words separated by punctuation but
no white space will implicitly be treated like a phrase, so a query love/hate will search for the word “love” immediately followed by the word “hate” The search is done across all (string) properties.
n Exact phrases enclosed in double quotes For example, a query “Majestik Møøse” will return items containing those two words in sequence (There is
an indexing option controlling whether diacritics such as that in “ø” need to
be matched exactly.) If a wildcard character (*) follows immediately after the closing double quote, partial matches will be accepted for each word in the phrase, so a query “my dog”* will return items containing the phrase “mystic dogfood” The double quotes also make sure that the enclosed words are interpreted literally, rather than as aQS keywords The search is done across all (string) properties.
n property searches on the form Property: Operation Value, where Operation
is optional and one of those described below Property is any term fying a property of an item; in particular, the label of a property is a valid aQS keyword For string-valued properties, Value is any word or phrase as described above, while for properties with other types of values (such as integer, date/time, or Boolean), values are recognized according to the user locale an item is returned if Value is found in Property in the way speci- fied by Operation (see below) If Operation is omitted, word search is used for string-valued properties and = is used for other properties For example,
identi-a query tidenti-ags:John returns documents where the Tidenti-ags property contidenti-ains (identi-a word beginning with) “John”, while a query taken:>2007 returns taken in the year 2007 or later.
Trang 23n Comparison operations include >, >=, <, <=, =, and <>, with the obvious meanings, and can be applied to numeric properties as well as string and date/time properties.
n Character-based operations include ~< (value starts with), ~> (value ends with), and ~~ (value contains) For example, a query author:~>ing returns items for which the Author property ends with the characters “ing”, while a
query title:~~”ill a mock” returns items containing the character sequence
“ill a mock” anywhere in the Title property (when used with these
opera-tions, the double quotes allow white space in the search string) The character operations are generally much slower than the word-based operations The character operations can only be applied to specific properties; there is no syntax for searching for an arbitrary character sequence across all properties.
n The fourth character-based operation is ~, which interprets the wildcard character (*) and the single wildcard character (?) like the file system does:
matching zero or more arbitrary characters and matching one arbitrary character, respectively For example, a query author:~?oe will return items
in which the Author property is “joe” or “moe” (Note that the match will be
against the whole value, so a more realistic query may be author:~”?oe *”, which will return items where the second, third and fourth characters are “o”,
“e” and a space, respectively, with anything in the other characters.)
n Word search and word prefix search can be specified explicitly using the operations $$ and $<, respectively (but because they are the default operations for string-valued properties, this is rarely necessary).
n The special value [] represents “no value” or “null value.” So the query tag:=[]
returns all items that have no value for the Tags property, while the query
tag:<>[] (or –tag:=[], or tag:-[]) returns all items that have a value for the
Tags property.
n For any property that has “symbolic” values, these strings can be used as values in aQS For example, importance:normal returns all items where the
Importance property is between 2 and 4, size:small returns all items with
a Size between 10241 and 102400, kind:docs returns all items where Kind contains “document”, and flashmode:flashredeye returns all images where the Flash mode property is 65.
n There are also symbolic values for some relative date values: today, yesterday, tomorrow, this week, last week, next week, this month, last month, next month, this year, last year, and next year These all denote the current, previous, or next complete calendar day/week/month/year One can also specify the last day, the next day, the last week, the next week, the last month, the next month, the last year, and the next year These denote
a time period of the specified length beginning or ending at the current time
Trang 24the space is optional here) returns items where the Date Modified property
has a value in the previous calendar month, while taken:the last week (or taken:thelastweek) returns pictures with Date taken in the previous 24 × 7 hours as mentioned above, one can also use absolute date/time values expressed according to the user’s locale; so if the user locale is Thai with the Thai solar calendar, a query created:19/6/2552 or created:19 2552 will return items created on the day that is June 19, 2009 in the Gregorian calendar.
n a range of values can be specified as FirstValue lastValue For example, taken:March 2007 June 2008 will return pictures taken between March 1,
2007 and June 30, 2008 (assuming a user locale that uses the Gregorian calendar).
n Integer suffixes for kilobytes, Megabytes, etc., are recognized, so a query size:<=1MB will return items with a size that is at most 1,048,576 bytes.
n There are some “virtual” properties for special purposes available only through aQS: before:DateTime and after:DateTime return items where the primary Date property is less than or greater than the specified date/time
from: searches over both sender name and address of messages; similarly, so does to:, cc:, bcc:, organizer:, required:, optional: and resources: Likewise, file: will interpret its value as some combination of a path, a file name, and
a file extension, and ? and * will be interpreted as wildcards So the query file:report*.doc will return all documents having a name beginning with
“report” and a “doc” extension; a query file:report?.doc will return all ments with a name consisting of “report” plus one character and a “doc” extension; a query file:\\lab\files\* will return all files with a path rooted in
docu-“\\lab\files”; while a query file:”C:\Program Files\SomeCompany\*\*.log” will return all files with extension “log” under the folder “C:\program Files
“C:\Budgets\2006” and its subfolders.
n What goes after property: may actually be multiple values combined using AND, OR, and NOT, each with an optional operation; so a query
kind:(communication –email) will return items that have Kind
“communica-tion” but not “email” (note that Kind is a multivalued property), and taken:(>
last month < next month) would be a somewhat convoluted way of ing the same query as taken:this month.
express-n property names and symbolic values must all be expressed in the user’s fault UI language to be recognized as such In this way, users can express
Trang 25de-queries in a language consistent with the rest of their UI This means that a query title:zoo will return items with “zoo” in the title for a user with English
UI but not for one with Swedish UI In order to make it possible to write ries (for programmatic use) that work regardless of the user’s UI language, the synonyms for each property include the “canonical name” of that property
que-For example, the canonical form of the previous query is System.Title:zoo (or even System.Title:$<zoo to make sure that partial matching will be used).
n a more relaxed form of aQS in which colons are not required after property names is activated by using the Use Natural Language Search option, which allows users to create queries that resemble natural language When this option is turned on, a query music by REM will return items with Kind music created by REM (by is a synonym for the Creators property) This is a some- what experiemental feature as it increases ambiguity (a word to be searched for may be misinterpreted as a property name, for example) and should be used with caution.
For more information on aQS, see http://msdn.microsoft.com/en-us/library /bb266512.aspx on MSDN and http://www.microsoft.com/windows/products /winfamily/desktopsearch/technicalresources/advquery.mspx To build complex
search queries without using aQS, use the advanced Search pane described previously in this chapter.
Using Federated Search
Federated Search enables users to use the familiar Windows Explorer interface to search tent located on repositories such as Windows SharePoint sites, intranet sites, and other types
con-of remote data sources, including sites on the Internet The goal con-of Federated Search is to allow users to work with files stored on these repositories as easily as they can work with files
on their local computers’ file systems
note Federated Search in Windows 7 does not interleave results from multiple sources
You must search each source separately.
How Federated Search Works
Federated Search uses search connectors, which are XML files that store information on how to connect to a remote data source Search connectors are installed using OpenSearch Description (OSDX) files, which are XML files that have the osdx file extension When opened, these files create a searchConnector-ms file in the %UserProfile%\Searches folder on the computer and a shortcut to this file in the Favorites area of the navigation pane of Windows